summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Andaya <samuel@andaya.net>2012-10-14 10:12:34 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-10-15 00:46:44 +0200
commitf1598d7814b3c82b16f1a6b4e82ae41613e09501 (patch)
tree06385b5818fef2445a14c7c61e45c7f52d45a868 /src
parent8de507b99b78766a567935c59bc81e310667b163 (diff)
downloadnetctl-f1598d7814b3c82b16f1a6b4e82ae41613e09501.tar.gz
netctl-f1598d7814b3c82b16f1a6b4e82ae41613e09501.tar.xz
Add support for "options" in /etc/resolv.conf.
Example DNS=('8.8.8.8' '8.8.4.4') DNS_OPTIONS=('rotate' 'timeout:1') Will create the following /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 options rotate options timeout:1 (patch edited by Jouke Witteveen)
Diffstat (limited to 'src')
-rw-r--r--src/connections/ethernet3
-rw-r--r--src/connections/openvpn3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet
index 33aae2f..a6a53bd 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -218,6 +218,9 @@ ethernet_up() {
for dns in "${DNS[@]}"; do
echo "nameserver $dns" >>/etc/resolv.conf
done
+ for dnsoption in "${DNS_OPTIONS[@]}"; do
+ echo "option $dnsoption" >>/etc/resolv.conf
+ done
fi
return 0
diff --git a/src/connections/openvpn b/src/connections/openvpn
index 27c8c65..6ecfeb7 100644
--- a/src/connections/openvpn
+++ b/src/connections/openvpn
@@ -28,6 +28,9 @@ openvpn_up() {
for dns in "${DNS[@]}"; do
echo "nameserver $dns" >>/etc/resolv.conf
done
+ for dnsoption in "${DNS_OPTIONS[@]}"; do
+ echo "option $dnsoption" >>/etc/resolv.conf
+ done
fi
}