Created
August 11, 2012 12:18
-
-
Save farhaven/3324170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 2>&1 | |
env > /tmp/up-${script_type}.env | |
if [ "${script_context}" != "init" ]; then | |
exit | |
fi | |
case "${script_type}" in | |
up) | |
/sbin/ifconfig "${dev}" "${ifconfig_local}" netmask "${ifconfig_netmask}" mtu "${tun_mtu}" | |
;; | |
route-up) | |
route add ${remote_1} ${route_net_gateway} | |
route delete default | |
route add default ${route_vpn_gateway} | |
;; | |
*) | |
echo "Unknown script type ${script_type}" | logger -t up | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment