Hi, I have the same problem and adding this script to /etc/ppp/ip-up.d/ seems to fix the problem :
---code---
#!/bin/sh -e
### /etc/ppp/ip-up.d/p3scan
# test if p3scan is running
is_running() {
RUNNING=""
if [ -f /var/run/p3scan/p3scan.pid ]; then
pid=$(cat /var/run/p3scan/p3scan.pid)
# get the pid if exists
exe=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* //')
if [ "X$exe" = "X/usr/sbin/p3scan" ]; then
# check if we have the good pid
RUNNING="Y"
fi
fi
logger p3scan ip-up "is_running" : $RUNNING
}
# peaceful p3scan stop
cool_stop() {
logger p3scan ip-up "cool_stop"
# /etc/init.d/p3scan stop
/usr/sbin/invoke-rc.d p3scan stop
}
# p3scan violent death
violent_stop() {
logger p3scan ip-up "violent_stop"
kill -9 $pid
rm -f /var/run/p3scan/p3scan.pid
}
## Main loop
is_running
if [ -n "$RUNNING" ]; then
cool_stop
sleep 5
is_running
if [ -n "$RUNNING" ]; then
violent_stop
fi
fi
# restart
# /etc/init.d/p3scan start
/usr/sbin/invoke-rc.d p3scan start
exit 0
----end code-----
I'm not sure if the "violent_stop" function is necessary, but I added it
since the only thing to do when p3scan hangs this way is to kill the
process.
Hope this help.
Cheers,
--
Luc Milland
www.praksys.org
Midi-Pyrénées et Aquitaine
tel : 05 62 79 74 89
fax : 05 62 79 75 47
Membre du réseau Libre Entreprise
signature.asc
Description: Ceci est une partie de message numériquement signée

