aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts/default.script
diff options
context:
space:
mode:
Diffstat (limited to 'main/busybox-initscripts/default.script')
-rw-r--r--main/busybox-initscripts/default.script11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/busybox-initscripts/default.script b/main/busybox-initscripts/default.script
index 511c540bec..2a8267f221 100644
--- a/main/busybox-initscripts/default.script
+++ b/main/busybox-initscripts/default.script
@@ -83,11 +83,16 @@ resolvconf() {
for i in $NO_DNS; do
[ "$i" = "$interface" ] && return
done
- echo -n > "$RESOLV_CONF"
- [ -n "$domain" ] && echo "search $domain" >> "$RESOLV_CONF"
+ echo -n > "$RESOLV_CONF.$$"
+ if [ -n "$search" ]; then
+ echo "search $search" >> "$RESOLV_CONF.$$"
+ elif [ -n "$domain" ]; then
+ echo "search $domain" >> "$RESOLV_CONF.$$"
+ fi
for i in $dns; do
- echo "nameserver $i" >> "$RESOLV_CONF"
+ echo "nameserver $i" >> "$RESOLV_CONF.$$"
done
+ mv "$RESOLV_CONF.$$" "$RESOLV_CONF"
}
bound() {