>>Greetings folks,
>>I am new ISP and currently used the super nice diald script to maintain
>>my connection to the internet. What I realized I need now is a way to
>>automatically initiate a ppp or diald script during bootup after after
a
>>power fail occurs.
>>I understand you can do this either in the inittab or rc.local files
but
>>am not sure how to implement the confiuration to start a ppp script and
>>have it respawn if the connection dies (likewise w/ diald). I had some
>>help from some kind folks here before, but lost their messages (don't
>>know if an archive for this group exists either).
>Well, as far as diald is concerned, you should be able to just
>start diald in your rc.local file the same way you start it
>from the command line. I've recently had a bug report that
>this won't work as expected if the rc script finishes before
>diald forks into the background. I'll be fixing this in the
>next release, but in the mean time you can avoid this by
>either running diald in your rc.local with (for example)
>setsid /usr/sbin/diald /dev/cua3 -f /etc/diald.local
>or by putting a "sleep 1" after your diald invocation.
>(Note that if you invoke diald early enough in your rc
>startup procedure, then you will never see this problem.
>This probably explains why this long present bug has not
>been reported until now.)
Thanks Eric for responding.
Perhaps your explaination gives light to why some of my early attempts to
put my diald script in rc.local failed. The modem lights would flicker
alittle bit like the script was going to work and then the process was
crippled and prevented me from connecting w/o killing the process all
together.
Currently two processes are started before the diald script and my diald
incantation is a little different from yours. In rc.local I have
echo "Starting up diald..."
/etc/diald.1387
where diald.1387 is
#!/bin/sh
/etc/diald /dev/cua1 -m ppp \
local 205.216.109.65 \
remote 205.216.96.127 \
defaultroute \
modem \
crtscts \
up \
connect "/etc/chat -v -f /etc/ppp_chat1"
which works flawlessly when executed from the command line manually. I
am not sure what the setsid command does. I don't use it to start innd
or httpd but maybe the absence of this command is also part of the reason
why the bootup script does not work in my case.
Any comment on this inference, Eric?
Thanks,
-Mike James