summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rwxr-xr-xremote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx18
1 files changed, 11 insertions, 7 deletions
diff --git a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
index cf140246..482adedc 100755
--- a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
+++ b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
@@ -19,20 +19,24 @@
. /opt/openslx/config
-RESOLV_CONF="/etc/resolv.conf"
+RESOLV_CONF="/run/network/resolv.conf"
THIS_RESOLV="/run/network/${interface}.resolv"
rebuild_resolv_conf () {
- # Maybe make this smarter some time, if anyone is using client's that are on multiple networks at once etc...
+ # Don't do anything if the active resolv.conf is not ours
+ # Also this will not run resolvconf update.d... No idea if we should still do so...
+ [ -L "/etc/resolv.conf" ] || return 0
+ [ "x$(readlink "/etc/resolv.conf")" == "x${RESOLV_CONF}" ] || return 0
+ # Maybe make this smarter some time, if anyone is using clients that are on multiple networks at once etc...
# This is a little braindead but should work most of the time
sort -u /run/network/*.resolv > "$RESOLV_CONF" 2> /dev/null
# add support for resolv.conf update scripts // see man(8) resolvconf
- if [ -d /etc/resolvconf/update.d ]; then
- for s in $(ls -1 /etc/resolvconf/update.d/*.sh); do
- $s
- done
- fi
+ if [ -d /etc/resolvconf/update.d ]; then
+ for s in $(ls -1 /etc/resolvconf/update.d/*.sh); do
+ $s
+ done
+ fi
}
escape_search() {