Problematic Exit Codes
Tim Vaillancourt
tim at fillz.com
Tue Feb 2 18:09:29 EST 2010
Hey guys,
For starters, thank you for making Openconnect! It has been of great use
to me once I found it after ripping my hair out trying to get Cisco
AnyConnect to work from Debian. I really appreciate what you're doing,
keep it up! For this reason, I want to help a bit by offering a bug I
found. I know Debian Lenny/Stable isn't at the most recent version, but
I didn't see this listed as a bugfix/new feature on newer releases on
the project site. Please ignore me if this has already came up on the list.
When I use the 64-bit Stable/Lenny Debian package, Openconnect 2.0.1
(Lenny's current version), I get an exit code of "1" on successful
connect, causing me to have to pipe the openconnect command into "||
true" to allow my scripts to continue, or set "set -e" around the command.
For starters, wouldn't exit code 0 make more sense on successful
connect, like most UNIX/Linux command line scripts/binaries? Secondly,
is this something that could be fixed in future releases, or is fixed in
future releases?
*
ENVIRONMENT:*
"tim at thor:~$ openconnect --version
OpenConnect version v2.01"
"tim at thor:~$ cat /etc/debian_version
5.0.4"
"tim at thor:~$ uname -ar
Linux thor 2.6.26-2-amd64 #1 SMP Thu Nov 5 02:23:12 UTC 2009 x86_64
GNU/Linux"
"thor:~# dpkg-query -l openconnect
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
ii openconnect 2.01-1 Open client
for Cisco AnyConnect VPN"
*ERROR REPRODUCTION:*
"thor:~# openconnect -v -i tun0 --background --syslog --no-dtls -U
tim -u tim vpn.example.com; echo $?
Please enter your username and password.
Password:
1
thor:~# route add -net 10.10.0.0 netmask 255.255.0.0 dev tun0
thor:~# ping 10.10.11.219
PING 10.10.11.219 (10.10.11.219) 56(84) bytes of data.
64 bytes from 10.10.11.219: icmp_seq=2 ttl=127 time=43.4 ms
64 bytes from 10.10.11.219: icmp_seq=3 ttl=127 time=45.9 ms
64 bytes from 10.10.11.219: icmp_seq=4 ttl=127 time=43.0 ms
^X^C
--- 10.10.11.219 ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3020ms
rtt min/avg/max/mdev = 43.052/44.131/45.920/1.296 ms"
Again, thanks for Openconnect, and your time!
Tim Vaillancourt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20100202/7c803908/attachment.htm>
More information about the openconnect-devel
mailing list