allow overriding utilities and /var location

This patch enables a wrapper to override the /sbin/ip and
/sbin/resolvconf utilities, and the /etc, /var locations.

The idea is to allow non-root execution of vpnc, as tun
can be used by unprivileged user.

A simple vpnc-script wrapper such as the following is doing
the work:
 ---
export HOOKS_DIR="/home/user/vpnc"
export VAR_RUN="/home/user/vpnc/run"
export IPROUTE="sudo /sbin/ip"
export RESOLVCONF="sudo /sbin/resolvconf"

exec /etc/vpnc/vpnc-script
 ---

Configuration:
 ---
Interface name vpn0
Local Port 0
Pidfile /home/user/vpnc/run/pid
Script /home/user/vpnc/vpnc-script
 ---

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
 ---
 vpnc-disconnect |    3 ++-
 vpnc-script     |   21 ++++++++++++---------
 2 files changed, 14 insertions(+), 10 deletions(-)
delete tun address on disconnect

This enables persist tun device to be reused in future
connections.

ipv6 is not tested.

Maybe it would be cleaner to define functions for address
manipulation, not sure.

To be simple, this patch only handles iproute2.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
always run the vpnc-script at exit

This allows persisted tun device to be cleaned up for reuse.

This is the minimal change to reach the goal using atexit(),
not sure it is the best way.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
support route metric

This adds optional ROUTE_METRIC environment variable to vpnc-script to
allow set non default routes and dns metrics.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
support password program

Allows to integrate UI, similar to ssh-askpass, program prompt user
for password and echo result to stdout.

Settings:
 ---
Password Program /home/alonbl/vpnc/vpnc-getpass
Xauth interactive
 ---

vpn-getpass script for KDE:
 ---
prompt="$1"
exec kdialog --title "vpnc" --password "$prompt";
 ---

vpn-getpass script for KDE with SecurID:
 ---
prompt="$1"
pass="$(kdialog --title "vpnc" --password "$prompt")" || exit 1
otp="$(RSA_SecurID_getpasswd)" || exit 1
echo "${pass}${otp}"
exit 0
 ---

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>