Sfoglia il codice sorgente

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>
Yousong Zhou 9 anni fa
parent
commit
23feea5814
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3
    2
      net/xl2tpd/files/l2tp.sh

+ 3
- 2
net/xl2tpd/files/l2tp.sh Vedi File

@@ -39,8 +39,9 @@ proto_l2tp_setup() {
39 39
 		exit 1
40 40
 	}
41 41
 
42
-	if [ ! -p /var/run/xl2tpd/l2tp-control ]; then
43
-		/etc/init.d/xl2tpd start
42
+	# Start and wait for xl2tpd
43
+	if [ ! -p /var/run/xl2tpd/l2tp-control -o -z "$(pidof xl2tpd)" ]; then
44
+		/etc/init.d/xl2tpd restart
44 45
 
45 46
 		local wait_timeout=0
46 47
 		while [ ! -p /var/run/xl2tpd/l2tp-control ]; do