SOURCES: openvpn.init - in status show also up tunnels that aren't...
glen
glen at pld-linux.org
Tue Oct 17 11:19:54 CEST 2006
Author: glen Date: Tue Oct 17 09:19:54 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- in status show also up tunnels that aren't autostarted
---- Files affected:
SOURCES:
openvpn.init (1.24 -> 1.25)
---- Diffs:
================================================================
Index: SOURCES/openvpn.init
diff -u SOURCES/openvpn.init:1.24 SOURCES/openvpn.init:1.25
--- SOURCES/openvpn.init:1.24 Mon Oct 2 22:21:33 2006
+++ SOURCES/openvpn.init Tue Oct 17 11:19:49 2006
@@ -38,7 +38,7 @@
return $?
}
-# check if all the tunnels are up
+# check if all the configured tunnels are up
tunlsup() {
ret=0
for tun in $TUNNELS; do
@@ -123,11 +123,14 @@
nls "Configured tunnels:"
echo " $TUNNELS"
nls "Currently active tunnels:"
- for tun in $TUNNELS; do
+ for pidfile in /var/run/openvpn/*.pid; do
+ [ -f "$pidfile" ] || continue
+ tun=${pidfile#/var/run/openvpn/}
+ tun=${tun%.pid}
tunlup $tun && echo -n " $tun($(cat /var/run/openvpn/$tun.pid))"
done
echo ""
- status openvpn
+ tunlsup
exit $?
;;
*)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/openvpn.init?r1=1.24&r2=1.25&f=u
More information about the pld-cvs-commit
mailing list