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 <redacted>
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