diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-02-16 18:11:48 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-02-16 18:11:48 +0000 |
commit | bdf816433ca2a178354ebcda650b807fd3e64e7b (patch) | |
tree | bec3cf68ad9f1ab8b1e9b043a1887c674473d8d2 /package/l2tp | |
parent | 6fadee86df2527f0fd3083b470c0ee50d73bb2db (diff) | |
download | buildroot-novena-bdf816433ca2a178354ebcda650b807fd3e64e7b.tar.gz buildroot-novena-bdf816433ca2a178354ebcda650b807fd3e64e7b.zip |
- add runlevel script
Diffstat (limited to 'package/l2tp')
-rw-r--r-- | package/l2tp/l2tp.mk | 1 | ||||
-rwxr-xr-x | package/l2tp/l2tpd | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/package/l2tp/l2tp.mk b/package/l2tp/l2tp.mk index 6f623362b..1efc631cc 100644 --- a/package/l2tp/l2tp.mk +++ b/package/l2tp/l2tp.mk @@ -39,6 +39,7 @@ $(L2TP_DIR)/$(L2TP_BINARY): $(L2TP_DIR)/.unpacked $(TARGET_DIR)/$(L2TP_TARGET_BINARY): $(L2TP_DIR)/$(L2TP_BINARY) cp -dpf $(L2TP_DIR)/$(L2TP_BINARY) $@ + cp -dpf package/l2tp/l2tpd $(TARGET_DIR)/etc/init.d/ $(STRIP) $@ l2tp: uclibc $(TARGET_DIR)/$(L2TP_TARGET_BINARY) diff --git a/package/l2tp/l2tpd b/package/l2tp/l2tpd new file mode 100755 index 000000000..0b51339f3 --- /dev/null +++ b/package/l2tp/l2tpd @@ -0,0 +1,27 @@ +#!/bin/sh +# +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/l2tpd +PIDFILE=/var/run/l2tpd.pid + +test -f $DAEMON || exit 0 + +case "$1" in + start) + start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- -D & + ;; + stop) + start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON + ;; + restart|force-reload) + start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON + sleep 1 + start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON + ;; + *) + echo "Usage: /etc/init.d/l2tdp {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 |