Lines 111-116 of /etc/init.d/openconnect runs "ip addr show $VPN" in a tight loop. However, when the VPN isn't up yet, I get a bunch of output saying 'Device "vpn0" does not exist.' until the VPN connection is made. 1. This shouldn't be in a tight loop. There should be a sleep, maybe "/usr/bin/sleep 0.5" to keep the load down. 2. stderr needs to be redirected from ip's output. while true; do /usr/bin/sleep 0.5 if [ -n "$(ip addr show $VPN 2> /dev/null | grep inet)" ]; then #.... (Sleeping first is probably useful because it's going to take at least that long to make the connection anyway.) Reproducible: Always Steps to Reproduce: 1. Set up openconnect 2. Run /etc/init.d/openconnect.vpn0 restart
Created attachment 382928 [details] openconnect.init.in-r3 Sent ip device not exist messages to stderr and slowed down the loop for running post up so that it waits for the interface to come up before it runs the script.
I can't test it since I run systemd, but looks fine to me. Thanks! + 09 Dec 2014; Mike Gilbert <floppym@gentoo.org> metadata.xml: + Add myself as a maintainer. +*openconnect-7.01 (09 Dec 2014) + + 09 Dec 2014; Mike Gilbert <floppym@gentoo.org> +files/openconnect.init.in-r3, + +openconnect-7.01.ebuild: + Version bump. init script adjustments, bug 519928.