vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Is there a way within /etc/ppp/ip-down to know whether the link is being terminated because of a system shutdown vs any other reason? There are actions I don't want the script to do if the system is being shutdown. I'm running kernel 2.6.14, ppp-2.4.3 and rp-pppoe-3.6 This is not a specific distribution. It's my own setup, but all of the standard tools/utilities are in place. Thanks! |
| |||
| "Kevin Phillips" <knp@abs.net> writes: >Is there a way within /etc/ppp/ip-down to know whether the >link is being terminated because of a system shutdown vs >any other reason? There are actions I don't want the >script to do if the system is being shutdown. On system shutdown with sysV style first the kills from the startup script for the shutdown runlevel are run. Then programs are sent a kill. Then programs are sent a kill -9 which means that there is nothing the program can do. So you could put in pppd kill script into the shutdown runlevel which sets an environment variable which ip-down reads or what would probably work better a file is touched ( and removed by the ip-down script so it does not hang around for the next time) and if that file exists, ip-down differs in its shutdown. >I'm running kernel 2.6.14, ppp-2.4.3 and rp-pppoe-3.6 >This is not a specific distribution. It's my own setup, >but all of the standard tools/utilities are in place. A secret is it? "I won't tell you anything about my system but can you help me?" There are no "standard tools/utilities" each distro differs For example as I understand, debian run-levels are very different from Redhat/Mandrake runlevels, etc. >Thanks! |
| ||||
| Unruh wrote: > ... or what would > probably work better a file is touched ( and removed by the ip-down script > so it does not hang around for the next time) and if that file exists, > ip-down differs in its shutdown. Excellent idea. Thank you. |