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 0bbdcfc..ac7d5e1 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 6f1ff77..f1a98df 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 b8ec03d..f75c94f 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