From: Frank Brehm Date: Tue, 24 Jan 2012 21:52:12 +0000 (+0100) Subject: OpenVPN aktualisiert X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=cb8329b3996e61b3be3570b837c34612c5e3ebb6;p=config%2Fbruni%2Fetc.git OpenVPN aktualisiert --- diff --git a/.etckeeper b/.etckeeper index 2a850961..62ee71f8 100755 --- a/.etckeeper +++ b/.etckeeper @@ -1415,6 +1415,7 @@ maybe chmod 0644 './radvd.conf' maybe chmod 0644 './rc.conf' maybe chmod 0644 './request-key.conf' maybe chmod 0644 './resolv.conf' +maybe chmod 0644 './resolv.conf.bak' maybe chmod 0755 './revdep-rebuild' maybe chmod 0644 './revdep-rebuild/60-java' maybe chmod 0644 './revdep-rebuild/61-icedtea6-bin' diff --git a/.gitignore b/.gitignore index fa8caf32..75bc1dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -45,5 +45,6 @@ openvpn/openvpn-status.log .sw? \#*\# DEADJOE +*.bak # end section managed by etckeeper diff --git a/motd b/motd index 2b5a3c15..d44db477 100644 --- a/motd +++ b/motd @@ -7,8 +7,10 @@ Gentoo Base System release 2.0.3 |____/|_| \__,_|_| |_|_| -Wenn ich wüßte, was Kunst ist, würde ich es für mich behalten. - -- Pablo Picasso +Gewinsel haben wir hier schon besser gesehen. Von Haluk z.B. + +-- Felix von Leitner in de.comp.security.firewall + 2002-05-07 <3cd8588f@fefe.de> Today is Prickle-Prickle, the 24th day of Chaos in the YOLD 3178 diff --git a/openvpn/profitbricks/resolv.conf b/openvpn/profitbricks/resolv.conf index 5c20275d..93a7dfad 100644 --- a/openvpn/profitbricks/resolv.conf +++ b/openvpn/profitbricks/resolv.conf @@ -1,5 +1,6 @@ # Hand made by Frank Brehm -domain profitbricks.localdomain -search profitbricks.localdomain home.brehm-online.com home.hennig-berlin.org brehm-online.com hennig-berlin.org +domain brehm-online.com +search home.brehm-online.com home.hennig-berlin.org brehm-online.com hennig-berlin.org uhu-banane.de profitbricks.localdomain dc1.de.profitbricks.net +#nameserver 10.12.11.1 nameserver 192.168.178.30 nameserver 192.168.178.85 diff --git a/openvpn/profitbricks/update-resolv-conf b/openvpn/profitbricks/update-resolv-conf index a9d242d0..c33a5617 100755 --- a/openvpn/profitbricks/update-resolv-conf +++ b/openvpn/profitbricks/update-resolv-conf @@ -16,42 +16,58 @@ # foreign_option_2='dhcp-option DNS 193.43.27.133' # foreign_option_3='dhcp-option DOMAIN be.bnc.ch' -[ -x /sbin/resolvconf ] || exit 0 +#[ -x /sbin/resolvconf ] || exit 0 +# +#case $script_type in +# +#up) +# for optionname in ${!foreign_option_*} ; do +# option="${!optionname}" +# echo $option +# part1=$(echo "$option" | cut -d " " -f 1) +# if [ "$part1" == "dhcp-option" ] ; then +# part2=$(echo "$option" | cut -d " " -f 2) +# part3=$(echo "$option" | cut -d " " -f 3) +# if [ "$part2" == "DNS" ] ; then +# IF_DNS_NAMESERVERS="$IF_DNS_NAMESERVERS $part3" +# fi +# if [ "$part2" == "DOMAIN" ] ; then +# IF_DNS_SEARCH="$part3" +# fi +# fi +# done +# R="" +# if [ "$IF_DNS_SEARCH" ] ; then +# R="${R}search $IF_DNS_SEARCH +#" +# fi +# for NS in $IF_DNS_NAMESERVERS ; do +# R="${R}nameserver $NS +#" +# done +# echo -n "$R" | /sbin/resolvconf -a "${dev}.inet" +# ;; +#down) +# /sbin/resolvconf -d "${dev}.inet" +# if [ -f /etc/resolv.conf.bak ]; then +# cp -p /etc/resolv.conf.bak /etc/resolv.conf +# fi +# ;; +#esac case $script_type in - -up) - for optionname in ${!foreign_option_*} ; do - option="${!optionname}" - echo $option - part1=$(echo "$option" | cut -d " " -f 1) - if [ "$part1" == "dhcp-option" ] ; then - part2=$(echo "$option" | cut -d " " -f 2) - part3=$(echo "$option" | cut -d " " -f 3) - if [ "$part2" == "DNS" ] ; then - IF_DNS_NAMESERVERS="$IF_DNS_NAMESERVERS $part3" - fi - if [ "$part2" == "DOMAIN" ] ; then - IF_DNS_SEARCH="$part3" - fi - fi - done - R="" - if [ "$IF_DNS_SEARCH" ] ; then - R="${R}search $IF_DNS_SEARCH -" - fi - for NS in $IF_DNS_NAMESERVERS ; do - R="${R}nameserver $NS -" - done - echo -n "$R" | /sbin/resolvconf -a "${dev}.inet" - ;; -down) - /sbin/resolvconf -d "${dev}.inet" - if [ -f /etc/resolv.conf.bak ]; then - cp -p /etc/resolv.conf.bak /etc/resolv.conf - fi - ;; + up) + if [ -f /etc/openvpn/profitbricks/resolv.conf ] ; then + cp -p -v /etc/resolv.conf /etc/resolv.conf.bak + cp -p -v /etc/openvpn/profitbricks/resolv.conf /etc/resolv.conf + fi + ;; + down) + if [ -f /etc/resolv.conf.bak ]; then + cp -p -v /etc/resolv.conf.bak /etc/resolv.conf + fi + ;; esac +# vim: ts=4 expandtab +