]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
Another bugfix when determining the controlling PID
authorDaniel Lenski <dlenski@gmail.com>
Wed, 17 Nov 2021 19:34:00 +0000 (19:34 +0000)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 17 Nov 2021 19:34:00 +0000 (19:34 +0000)
In 596d947a ("Use $VPNPID when provided by OpenConnect"), I inadvertently
included an extra space, which entirely defeated the purpose of checking
if this variable is empty.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
vpnc-script

index 012a406356622017ced49356e0b52174310664c1..237062e734dc984cc6dd0b669c4c603e88e8f2c4 100755 (executable)
@@ -94,7 +94,7 @@ HOOKS_DIR=/etc/vpnc
 # uniquely identify this VPN connection. Normally, the parent process
 # is a shell, and the grandparent's PID is the relevant one.
 # OpenConnect v9.0+ provides VPNPID, so we don't need to determine it.
-if [ -z "$VPNPID " ]; then
+if [ -z "$VPNPID" ]; then
     VPNPID=$PPID
     PCMD=`ps -c -o cmd= -p $PPID`
     case "$PCMD" in