blob: 51bddb89422f81fc0a82d12dc6cef9c24fb4691e [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001commit 7c58a1e244ea83a9e7bbd51a6d354cee25cdbd33
2Author: Aws Ismail <aws.ismail@windriver.com>
3Date: Wed Sep 12 23:35:40 2012 -0400
4
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06005Fix openl2tpd initscript
Brad Bishopd7bf8c12018-02-25 22:55:05 -05006
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06007- Correct the location of the retval statement.
8- use start-stop-daemon instead of daemon.
Brad Bishopd7bf8c12018-02-25 22:55:05 -05009
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060010Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
11
12Upstream-Status: Inappropriate [OE specific]
13
14Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050015
16diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
17index ce21b50..7f27bb7 100755
18--- a/etc/rc.d/init.d/openl2tpd
19+++ b/etc/rc.d/init.d/openl2tpd
20@@ -24,7 +24,7 @@ start() {
21 if [ -e /var/lock/subsys/openl2tpd ]; then
22 if [ -e /var/run/openl2tpd.pid ] && [ -e /proc/`cat /var/run/openl2tpd.pid` ]; then
23 echo -n $"cannot start openl2tpd: openl2tpd is already running.";
24- failure $"cannot start openl2tpd: openl2tpd already running.";
25+ #failure $"cannot start openl2tpd: openl2tpd already running.";
26 echo
27 return 1
28 fi
29@@ -32,9 +32,9 @@ start() {
30 modprobe -s pppol2tp || modprobe -s l2tp_ppp
31 RETVAL=$?
32 if [ $RETVAL -eq 0 ]; then
33- daemon openl2tpd $OPENL2TPDARGS
34+ start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
35+ RETVAL=$?
36 fi
37- RETVAL=$?
38 echo
39 if [ $RETVAL -eq 0 ]; then
40 touch /var/lock/subsys/openl2tpd
41@@ -52,7 +52,7 @@ stop() {
42 echo -n $"Stopping $prog: "
43 if [ ! -e /var/lock/subsys/openl2tpd ]; then
44 echo -n $"cannot stop openl2tpd: openl2tpd is not running."
45- failure $"cannot stop openl2tpd: openl2tpd is not running."
46+ #failure $"cannot stop openl2tpd: openl2tpd is not running."
47 echo
48 return 1;
49 fi