mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-15 06:10:02 +00:00
c4b9c4886a
IpPool is a userspace daemon for managing one or more pools of IP addresses. It was developed as part of the OpenL2TP project but has since been repackaged so that it may be used independently of OpenL2TP. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
66 lines
1.3 KiB
Diff
66 lines
1.3 KiB
Diff
Fix start error if lsb init-functions doesn't exist
|
|
|
|
Upstream-Status: Inappropriate [embedded specific]
|
|
|
|
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
|
|
|
diff --git a/debian/init.d b/debian/init.d
|
|
index 363ba89..0327fec 100644
|
|
--- a/debian/init.d
|
|
+++ b/debian/init.d
|
|
@@ -10,6 +10,9 @@
|
|
# Description: Start ippool daemon
|
|
### END INIT INFO
|
|
|
|
+# Source function library.
|
|
+. /etc/init.d/functions
|
|
+
|
|
DAEMON=/usr/sbin/ippoold
|
|
NAME=ippoold
|
|
MODULE=pppol2tp
|
|
@@ -18,7 +21,23 @@ MODULE=pppol2tp
|
|
test -x $DAEMON || exit 0
|
|
|
|
# Get lsb functions
|
|
-. /lib/lsb/init-functions
|
|
+if [ -f /lib/lsb/init-functions ]
|
|
+then
|
|
+ . /lib/lsb/init-functions
|
|
+else
|
|
+ log_begin_msg() {
|
|
+ echo -n $*
|
|
+ }
|
|
+
|
|
+ log_end_msg() {
|
|
+ if [ $1 -eq 0 ]; then
|
|
+ echo "done"
|
|
+ else
|
|
+ echo "failed"
|
|
+ fi
|
|
+ }
|
|
+fi
|
|
+
|
|
. /etc/default/rcS
|
|
|
|
case "$1" in
|
|
@@ -35,6 +54,10 @@ case "$1" in
|
|
fi
|
|
log_end_msg $?
|
|
;;
|
|
+ status)
|
|
+ status /usr/sbin/ippoold;
|
|
+ exit $?
|
|
+ ;;
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
@@ -46,7 +69,7 @@ case "$1" in
|
|
log_end_msg $?
|
|
;;
|
|
*)
|
|
- log_success_msg "Usage: /etc/init.d/ippoold {start|stop|restart|reload|force-reload}"
|
|
+ log_success_msg "Usage: /etc/init.d/ippoold {start|stop|status|restart|reload|force-reload}"
|
|
exit 1
|
|
esac
|
|
|