Using Up-scripts with KA9Q
It's long been a problem to specify hostnames for some of the KA9Q and Textwin commands
in autoexec.net such as
"time server", because at the time
they are executed nameservice is not available, since the link is not
Various options have been suggested:
- Hard-coding IP addresses in autoexec.net or in domain.txt is a Bad Idea because, inevitably, the addresses do change.
- Rearranging autoexec.net so that the server lines
are executed after dialling, and setting
inline onfor dialling, still has a margin of error because routing may not be properly established at the time - especially if the network is busy.
- Using the
time autofacility to automatically set the PC clock after logging in is also dangerous, because if your chosen time server cannot be contacted,
time autowill cause KA9Q to retry until it can, which may result in you staying online for longer than intended (especially if operating unattended).
The solution is to use the background scripting facility in Demon's customised KA9Q, as follows. All paths and filenames are relative to your KA9Q directory.
Remove calls to
"nntp kick"from autoexec.net.
Create an ASCII file called, e.g., timeset.scr, containing the
time server ntp.demon.co.uk
smtp gateway post.demon.co.uk
smtp timer 60
smtp timerline to be whatever it was in autoexec.net.
If you already have 'up' and 'down' scripts, continue at step 5. Hint: look for a file called "scripts"
like the one in step 4, and for 'up' and 'down'
in directory spool\scripts. The 'up' script would typically contain
finger@postcommands. The 'down' script would typically be empty. If you haven't, then continue at step 4.
Create a file called 'scripts' which looks like this:
0.0.0.0 up down
220.127.116.11 up down
"ppp sl0"after connecting (or
"ppp ax1"for founder members).
Create blank files called 'spool\scripts\up' and 'spool\scripts\down'.
Add the following lines to the 'up' script.
# This is where we put startup commands that require host resolution
nntp kickline above to say
'at now+0001 "nntp kick"'. This will ensure that your clock is set correctly before starting a news transfer, at the expense of waiting up to a minute before the transfer starts.
Note that, if you were to put the commands from either of the "sourceb" background scripts directly into the up script, you would no longer be able to log on to Demon. You'd find that, after logging on, the link appeared to hang. So don't :-)
If you have a line in autoexec.net of the form
'ppp sl0 idle 60 exit', change it to say
'at now+0001 "ppp sl0 idle 60 exit" '- with the double quotes but without the single ones. This is because adjusting the clock backwards would otherwise cause the idle exit to occur immediately. By putting it on a timer, the worst that happens is you wait an extra minute before logging off. If this bothers you, then don't do it, and be prepared that about a third of the time (depending on speed of your PC) your session may exit immediately after setting the clock.
That's it ! You will now no longer experience a two minute delay on
startup whilst the DNS lookup of ntp.demon.co.uk fails. And you are
no longer at risk of
time autositting there, banging its head against a failed ntpd, and keeping you online for hours on end.