In managed mode the script does not return the proper value
# Start vpnc.
if ! $command $current $vpnc_flags; then
echo "Running 'vpnc $current $vpnc_flags' failed."
$? is already unset by the if command and thus always 0, so that the script returns 0 instead of the return status of the failed vpnc call.
How-To-Repeat: You can start the script with a broken configuration (i.e. wrong password) in managed mode (don't use default config file).
Awaiting maintainers feedback
I forgot to write: the "--local-port 0" is also necessary,
because vpnc doesn't automatically use a different port (any more),
when port 500 is already in use.
This causes all but the first instance of vpnc to fail.