File: vpnc-script-detect-disconnect

package info (click to toggle)
openconnect 9.12-3.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,336 kB
  • sloc: ansic: 40,846; sh: 7,073; xml: 3,785; python: 1,791; makefile: 973; java: 475; sed: 10
file content (14 lines) | stat: -rwxr-xr-x 477 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh -x

# Fake script just for unit tests. Do not use.
# For a real one, see https://www.infradead.org/openconnect/vpnc-script.html

if [ "$reason" = "connect" ]; then
    ip link set dev "$TUNDEV" up mtu "$INTERNAL_IP4_MTU"
    ip addr add "$INTERNAL_IP4_ADDRESS/32" peer "$INTERNAL_IP4_ADDRESS" dev "$TUNDEV"
    ip -6 addr add $INTERNAL_IP6_NETMASK dev $TUNDEV
    rm -f ${DISCONNECT_FILE}
elif [ "$reason" = "disconnect" ];then
    touch ${DISCONNECT_FILE}
fi
exit 0