summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/ppp/ppp/init
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/ppp/ppp/init')
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp/init57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/init b/meta/recipes-connectivity/ppp/ppp/init
new file mode 100755
index 0000000000..0c0136049b
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/init
@@ -0,0 +1,57 @@
1#!/bin/sh
2#
3# /etc/init.d/ppp: start or stop PPP link.
4#
5# If you want PPP started on boot time (most dialup systems won't need it)
6# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
7# follow the instructions in the comments in that file.
8
9# Source function library.
10. /etc/init.d/functions
11
12test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
13if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
14
15case "$1" in
16 start)
17 echo -n "Starting up PPP link: pppd"
18 if [ "$RUNFILE" = "1" ]; then
19 /etc/ppp/ppp_on_boot
20 else
21 pppd call provider
22 fi
23 echo "."
24 ;;
25 stop)
26 echo -n "Shutting down PPP link: pppd"
27 if [ "$RUNFILE" = "1" ]; then
28 poff
29 else
30 poff provider
31 fi
32 echo "."
33 ;;
34 status)
35 status /usr/sbin/pppd;
36 exit $?
37 ;;
38 restart|force-reload)
39 echo -n "Restarting PPP link: pppd"
40 if [ "$RUNFILE" = "1" ]; then
41 poff
42 sleep 5
43 /etc/ppp/ppp_on_boot
44 else
45 poff provider
46 sleep 5
47 pppd call provider
48 fi
49 echo "."
50 ;;
51 *)
52 echo "Usage: /etc/init.d/ppp {start|stop|status|restart|force-reload}"
53 exit 1
54 ;;
55esac
56
57exit 0