summaryrefslogtreecommitdiffstats
path: root/etc/bmwm-cid_internet/init.d/ppp-daemon
blob: 17ea3b9a3ee91fa1ac4e569dff3e9e63eadd8a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
#
# /etc/init.d/ppp-daemon
#
# Configuration for BMW
#
# 2004/02/27 Robert Schwebel <r.schwebel@pengutronix.de>
#

case $1 in

	start)
		if [ ! -f /etc/ppp/pap-secrets ]; then
			echo "ppp not configured!"
			exit -1
		fi
		echo "loading ppp daemon:"
		/usr/sbin/pppd call gprs
		sleep 1
		echo "initially shuting down link"
		ifconfig ppp0 down
		[ "$?" ] || { echo "failed!"; exit -1; } 
		echo "done."
		;;
	stop)
		echo "stopping pppd daemon:"
		/usr/bin/killall pppd
		echo "done."
		;;
	*)
		echo "usage: $0 [start|stop]"
		;;
esac