summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/ppp/ppp/poff
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-connectivity/ppp/ppp/poff
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/ppp/ppp/poff')
-rw-r--r--meta/recipes-connectivity/ppp/ppp/poff26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/poff b/meta/recipes-connectivity/ppp/ppp/poff
new file mode 100644
index 0000000000..0521a9406a
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/poff
@@ -0,0 +1,26 @@
1#!/bin/sh
2
3# Lets see how many pppds are running....
4set -- `cat /var/run/ppp*.pid 2>/dev/null`
5
6case $# 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 ;;
19esac
20
21if [ -r /var/run/ppp-quick ]
22then
23 rm -f /var/run/ppp-quick
24fi
25
26exit 0