Hello Fabio,
Wednesday May 12 2021, Fabio Bizzi wrote to Michael Dukelsky:
FB> I'm switching from regualr Nodelist/Nodediff to the DailyLists, all
FB> works fine but nlupdate refuses to update it daily because (obviusly)
FB> the file is younger than 7 days. I've looked at the documentation but
FB> I haven't found a way to force the update.
FB> 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<
FB> --8<--
FB> ---------- Wed 12 May 2021, nlupdate/lnx 1.9.0-cur 27-01-17
FB> 1 07:43:54 Start
FB> C 07:43:54 Trying to update /home/husky/nodelist/Z2DAILY.131
FB> C 07:43:54 /home/husky/nodelist/Z2DAILY.131 younger than 7 days, no
FB> update necessary C 07:43:54 Trying to update
FB> /home/husky/nodelist/Z2PNT.127 C 07:43:54
FB> /home/husky/nodelist/Z2PNT.127 younger than 7 days, no update
FB> necessary 1 07:43:54 End
FB> 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<
FB> --8<--
FB> Is there any way to force it?
No, nltools were developed many years before the daily nodelist appeared and did not change since then.
I use the following script where '/etc/fido_profile' contains exported variables with some directories used later in this and other scripts.
================ Cut change-z2daily ================
#!/usr/bin/bash
#
# change-z2daily
# Usage:
# change-z2daily full-path-to-the-latest-nodelist
#
. /etc/fido_profile
NDL_DIR=$BASEDIR/etc/nodelist
LOG=$LOGDIR/nodelist.log
if [ ! -z $1 ]
then
# save the existing nodelist(s)
/usr/bin/find $NDL_DIR -maxdepth 1 -name 'Z2DAILY.*' -type f -execdir mv '{}' $NDL_DIR/save \;
if [ $? -ne 0 ]
then
$BINDIR/logstr $LOG $0 "Error saving the old nodelist"
exit
fi
cp -a $1 $NDL_DIR
if [ $? -le 1 ]
then
# copy was successful so we may delete the saved nodelist(s)
/usr/bin/find $NDL_DIR/save -maxdepth 1 -name 'Z2DAILY.*' -type f -delete
if [ $? -ne 0 ]
then
$BINDIR/logstr $LOG $0 "Error deleting the saved nodelist"
exit
fi
# compile the nodelist
$BINDIR/setflag compndl
# update routing
$BINDIR/setflag mkroute
else
# restore the saved nodelist
/usr/bin/find $NDL_DIR/save -maxdepth 1 -name 'Z2DAILY.*' -type f -execdir mv '{}' $NDL_DIR \;
if [ $? -ne 0 ]
then
$BINDIR/logstr $LOG $0 "Error restoring the saved nodelist"
exit
fi
fi
fi
================ End change-z2daily ================
The script is called by htick when it receives a file from Z2DAILY file echo:
ExecOnFile Z2DAILY Z2DAILY.??? /home/mike/bin/change-z2daily
Michael
... node (at) f1042 (dot) ru
--- GoldED+/LNX 1.1.5-b20180707
* Origin: Moscow, Russia (2:5020/1042)
|