~ubuntu-branches/debian/jessie/ppp/jessie

« back to all changes in this revision

Viewing changes to debian/patches/014_scripts_poff.diff

  • Committer: Bazaar Package Importer
  • Author(s): Michael Beattie
  • Date: 2001-12-11 00:24:05 UTC
  • Revision ID: james.westby@ubuntu.com-20011211002405-gcsjlgalwyjf99m2
Tags: 2.4.1.uus-4
Use MAKEDEV in postinst, not mknod. (Closes: #122574)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- ppp-2.4.0b4.orig/scripts/poff
 
2
+++ ppp-2.4.0b4/scripts/poff
 
3
@@ -0,0 +1,26 @@
 
4
+#!/bin/sh
 
5
+
 
6
+# Lets see how many pppds are running....
 
7
+set -- `cat /var/run/ppp*.pid 2>/dev/null`
 
8
+
 
9
+case $# in
 
10
+  0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
 
11
+     # on the assumption that we've not got that far yet.
 
12
+     killall pppd
 
13
+     ;;
 
14
+  1) # If only one was running then it can be killed (apparently killall
 
15
+     # caused problems for some, so lets try killing the pid from the file)
 
16
+     kill $1
 
17
+     ;;
 
18
+  *) # More than one! Aieehh.. Dont know which one to kill.
 
19
+     echo "More than one pppd running. None stopped"
 
20
+     exit 1
 
21
+     ;;
 
22
+esac
 
23
+
 
24
+if [ -r /var/run/ppp-quick ]
 
25
+then
 
26
+    rm -f /var/run/ppp-quick
 
27
+fi
 
28
+
 
29
+exit 0