]> 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>
Fri, 3 Jul 2015 12:36:12 +0000 (14:36 +0200)
If a daemon listens for route changes and wants to use the interface
afterwards, it should be able to resolve DNS

(cherry picked from commit 0b7bfacfeaf86c4001dc2ea46cecdc65c9cdfff1)

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

index de5273ca8b86b0d3c01dc9870662a995792f059f..cfc06feb4009ecf2031b2c0ee8a57ffe5e6628b2 100755 (executable)
@@ -96,13 +96,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