aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2015-08-11 11:46:29 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2015-08-14 12:16:27 +0800
commit23feea5814965aedc0d15e5af6d24cb2bcf2ddec (patch)
treecff1a66405180d34aba7f9a5e9765705fa5a7fd0
parente1a58c09b43f6deaf03e2dad4cee246e62a8bd63 (diff)
xl2tpd: fix aliveness check for xl2tpd process.
This change aims to address the following 2 issues - The control file was there yet xl2tpd process was not - The control file's existence prevented xl2tpd from start Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
1 files changed, 3 insertions, 2 deletions
diff --git a/net/xl2tpd/files/l2tp.sh b/net/xl2tpd/files/l2tp.sh
index 74c956c21..be6b61dcc 100644
--- a/net/xl2tpd/files/l2tp.sh
+++ b/net/xl2tpd/files/l2tp.sh
@@ -39,8 +39,9 @@ proto_l2tp_setup() {
exit 1
}
- if [ ! -p /var/run/xl2tpd/l2tp-control ]; then
- /etc/init.d/xl2tpd start
+ # Start and wait for xl2tpd
+ if [ ! -p /var/run/xl2tpd/l2tp-control -o -z "$(pidof xl2tpd)" ]; then
+ /etc/init.d/xl2tpd restart
local wait_timeout=0
while [ ! -p /var/run/xl2tpd/l2tp-control ]; do