SHA256
1
0
forked from pool/openvpn
openvpn/client-netconfig.down
OBS User autobuild 939724488c Accepting request 41476 from network:vpn
Copy from network:vpn/openvpn based on submit request 41476 from user mtomaschewski

OBS-URL: https://build.opensuse.org/request/show/41476
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openvpn?expand=0&rev=18
2010-06-21 17:25:12 +00:00

38 lines
1.0 KiB
Bash

#!/bin/bash
# Copyright (c) 2010 Andreas Schneider <anschneider@exsuse.de>
# Marius Tomaschewski <mt@suse.de>
# Licensed under the GPL version 2
# PURPOSE: This script automatically removes the /etc/resolv.conf
# and another settings applied before via netconfig.
# INSTALL NOTES:
# Place this file in /etc/openvpn/client.down
# Then, add the following to your /etc/openvpn/<clientconfig>.conf:
# client
# pull dhcp-options
# up /etc/openvpn/client.up
# down /etc/openvpn/client.down
# Finally, "chmod +x /etc/openvpn/client.{up,down}"
# disable pathname expansion
shopt -o -s noglob
# --up/--down patametes are:
#
# tun_dev tun_mtu link_mtu ifconfig_local_ip
# ifconfig_remote_ip [ init | restart ]
#
# tap_dev tap_mtu link_mtu ifconfig_local_ip
# ifconfig_netmask [ init | restart ]
dev=$1
# skip, when there is no interface parameter or netconfig
if test -a /sbin/netconfig -a "x${dev}" != x ; then
/sbin/netconfig remove -s openvpn -i "${dev}"
fi
# all done...
exit 0