]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/ppp/files/poff
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / ppp / files / poff
1 #!/bin/sh
2
3 # Lets see how many pppds are running....
4 set -- `cat /var/run/ppp*.pid 2>/dev/null`
5
6 case $# in
7   0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
8      # on the assumption that we've not got that far yet.
9      killall pppd
10      ;;
11   1) # If only one was running then it can be killed (apparently killall
12      # caused problems for some, so lets try killing the pid from the file)
13      kill $1
14      ;;
15   *) # More than one! Aieehh.. Dont know which one to kill.
16      echo "More than one pppd running. None stopped"
17      exit 1
18      ;;
19 esac
20
21 if [ -r /var/run/ppp-quick ]
22 then
23     rm -f /var/run/ppp-quick
24 fi
25
26 exit 0