Search
j0ke.net Open Build Service
>
Projects
>
server:network
>
openvpn
> client-netconfig.down
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File client-netconfig.down of Package openvpn
#!/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