# 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
+