[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bash: trap, logout signal ?

Hello ...

My ppp link is dial on demand. At present I have /etc/ppp/ppp_on_boot to start it. This is OK but if online I have to su and poff to kill the link once started, so I can use the phone, or wait 5 mins for it to drop. My wife struggles with this. I cannot use fluxbox docapps, or KDE to controll the link since poff was started, and has to be stopped as root

Learning about bash "trap" I thought I had the answer. Put the following in KDE "autostart" or just before fluxbox, execute with a & and should work ....


trap "poff -a" INT
while true; do

The dial on demand works great, It can be switched on & off by fluxbox & kde apps, BUT the trap to turn it off when one logs out does not trap. I have tried various signals but none seem to work.

What signal does KDE (& fluxbox) send to processes when a user loggs out. ?


Reply to: