]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network: setup gateway after setting up resolv.conf
authorHarald Hoyer <harald@redhat.com>
Thu, 28 May 2015 17:44:55 +0000 (19:44 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 28 May 2015 17:47:37 +0000 (19:47 +0200)
If a daemon listens for route changes and wants to use the interface
afterwards, it should be able to resolve DNS

modules.d/40network/net-lib.sh

index 35c18d103e4b7a0db7c5d574ea34b94adbdb0b18..a09cdafb6bee9a2363a8f92c17692d42e08f6d3d 100755 (executable)
@@ -94,13 +94,13 @@ setup_net() {
     [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
     [ -z "$IFACES" ] && IFACES="$netif"
     # run the scripts written by ifup
-    [ -e /tmp/net.$netif.gw ]            && . /tmp/net.$netif.gw
     [ -e /tmp/net.$netif.hostname ]      && . /tmp/net.$netif.hostname
     [ -e /tmp/net.$netif.override ]      && . /tmp/net.$netif.override
     [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
     # set up resolv.conf
     [ -e /tmp/net.$netif.resolv.conf ] && \
         cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
+    [ -e /tmp/net.$netif.gw ]            && . /tmp/net.$netif.gw
 
     # add static route
     for _p in $(getargs rd.route); do