From: Warren Togami Date: Tue, 13 Oct 2009 18:19:49 +0000 (-0400) Subject: Revert to per-device resolv.conf by Seewer's suggestion. X-Git-Tag: 003~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=157a8ddf5ca69363a82bec3bfbf184d5224de628;p=thirdparty%2Fdracut.git Revert to per-device resolv.conf by Seewer's suggestion. --- diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script index 0bbdcfc62..ac7d5e1ca 100755 --- a/modules.d/40network/dhclient-script +++ b/modules.d/40network/dhclient-script @@ -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 } diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot index 6f1ff77c2..f1a98df45 100755 --- a/modules.d/40network/netroot +++ b/modules.d/40network/netroot @@ -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 diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh index b8ec03db8..f75c94fda 100644 --- a/modules.d/45ifcfg/write-ifcfg.sh +++ b/modules.d/45ifcfg/write-ifcfg.sh @@ -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