]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Revert to per-device resolv.conf by Seewer's suggestion.
authorWarren Togami <wtogami@redhat.com>
Tue, 13 Oct 2009 18:19:49 +0000 (14:19 -0400)
committerWarren Togami <wtogami@redhat.com>
Tue, 13 Oct 2009 18:19:49 +0000 (14:19 -0400)
modules.d/40network/dhclient-script
modules.d/40network/netroot
modules.d/45ifcfg/write-ifcfg.sh

index 0bbdcfc62e8269c1e66ec5949d2efb8161408c40..ac7d5e1ca8a4a2442a351a7d34066c8400743bc9 100755 (executable)
@@ -32,12 +32,12 @@ setup_interface() {
 
     [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
 
-    [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/resolv.conf
+    [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
     if  [ -n "$namesrv" ] ; then
        for s in $namesrv; do
            echo nameserver $s 
        done
-    fi >> /tmp/resolv.conf
+    fi >> /tmp/net.$netif.resolv.conf
 
     [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
 }
index 6f1ff77c2a32f9329ea7ff35db1ca6a7992ae7d5..f1a98df4516977dff983fe5c3688215bef4f165a 100755 (executable)
@@ -75,7 +75,7 @@ done
 
 [ -e /tmp/net.$netif.gw ]          && . /tmp/net.$netif.gw
 [ -e /tmp/net.$netif.hostname ]    && . /tmp/net.$netif.hostname
-[ -e /tmp/resolv.conf ] && cp -f /tmp/resolv.conf /etc/resolv.conf
+[ -e /tmp/net.$netif.resolv.conf ] && cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
 
 # Load interface options
 [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
index b8ec03db897dd69bcd6f6889830116e0403e9d8a..f75c94fda5697b21b4562742c90cc37582514ec6 100644 (file)
@@ -55,6 +55,6 @@ done
 mkdir /dev/.initramfs/
 cp /tmp/net.* /dev/.initramfs/ >/dev/null 2>&1
 mkdir -p /dev/.initramfs/state/etc/sysconfig/network-scripts/
-cp /tmp/resolv.conf /dev/.initramfs/state/etc/ >/dev/null 2>&1
+cp /tmp/net.$netif.resolv.conf /dev/.initramfs/state/etc/ >/dev/null 2>&1
 echo "files /etc/sysconfig/network-scripts" > /dev/.initramfs/rwtab
 cp -a /tmp/ifcfg/* /dev/.initramfs/state/etc/sysconfig/network-scripts/ >/dev/null 2>&1