From: Daniel Lenski Date: Wed, 17 Nov 2021 19:34:00 +0000 (+0000) Subject: Another bugfix when determining the controlling PID X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d4c14b2b22ee8ab917db6db9fdfdd91cd7139d50;p=users%2Fdwmw2%2Fvpnc-scripts.git Another bugfix when determining the controlling PID 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 --- diff --git a/vpnc-script b/vpnc-script index 012a406..237062e 100755 --- a/vpnc-script +++ b/vpnc-script @@ -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