As i said, it depends on how long your program runs.
I had this effect on my previous system. The link was up, i issued a shutdown or reboot, the link started to go down (diald got SIGTERM), the mail-exchange-script started and got shot down (including pppd) by "Sending KILL to all processes" (by init).
I dont know of any way to keep Linux from shutting down for a moment, except when doing it in a K-script. Maybe you could have a K-script that checks if /var/lock/pppd.lock exists, execute your program, wait for it to finish (for example do a sync afterwards to be sure) and then quit, giving shutdown-control back to Linux which will kill the pppd. But this _could_ cause a hangup during shutdown or an undisconnected modem...
Aquacooler
PS: K-script: script in /etc/init.d/rc[1-5].d starting with "K" (K01something). I know SuSE, your milage may vary... |