diff options
Diffstat (limited to 'meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch')
-rw-r--r-- | meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch b/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch new file mode 100644 index 000000000..14a768d0f --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/ippool_init.d.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | Fix start error if lsb init-functions doesn't exist | ||
2 | |||
3 | Upstream-Status: Inappropriate [embedded specific] | ||
4 | |||
5 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
6 | |||
7 | diff --git a/debian/init.d b/debian/init.d | ||
8 | index 363ba89..0327fec 100644 | ||
9 | --- a/debian/init.d | ||
10 | +++ b/debian/init.d | ||
11 | @@ -10,6 +10,9 @@ | ||
12 | # Description: Start ippool daemon | ||
13 | ### END INIT INFO | ||
14 | |||
15 | +# Source function library. | ||
16 | +. /etc/init.d/functions | ||
17 | + | ||
18 | DAEMON=/usr/sbin/ippoold | ||
19 | NAME=ippoold | ||
20 | MODULE=pppol2tp | ||
21 | @@ -18,7 +21,23 @@ MODULE=pppol2tp | ||
22 | test -x $DAEMON || exit 0 | ||
23 | |||
24 | # Get lsb functions | ||
25 | -. /lib/lsb/init-functions | ||
26 | +if [ -f /lib/lsb/init-functions ] | ||
27 | +then | ||
28 | + . /lib/lsb/init-functions | ||
29 | +else | ||
30 | + log_begin_msg() { | ||
31 | + echo -n $* | ||
32 | + } | ||
33 | + | ||
34 | + log_end_msg() { | ||
35 | + if [ $1 -eq 0 ]; then | ||
36 | + echo "done" | ||
37 | + else | ||
38 | + echo "failed" | ||
39 | + fi | ||
40 | + } | ||
41 | +fi | ||
42 | + | ||
43 | . /etc/default/rcS | ||
44 | |||
45 | case "$1" in | ||
46 | @@ -35,6 +54,10 @@ case "$1" in | ||
47 | fi | ||
48 | log_end_msg $? | ||
49 | ;; | ||
50 | + status) | ||
51 | + status /usr/sbin/ippoold; | ||
52 | + exit $? | ||
53 | + ;; | ||
54 | restart) | ||
55 | $0 stop | ||
56 | sleep 1 | ||
57 | @@ -46,7 +69,7 @@ case "$1" in | ||
58 | log_end_msg $? | ||
59 | ;; | ||
60 | *) | ||
61 | - log_success_msg "Usage: /etc/init.d/ippoold {start|stop|restart|reload|force-reload}" | ||
62 | + log_success_msg "Usage: /etc/init.d/ippoold {start|stop|status|restart|reload|force-reload}" | ||
63 | exit 1 | ||
64 | esac | ||
65 | |||