]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
write-ifcfg: do't write MTU twice for regular eth devices
authorLukas Nykryn <lnykryn@redhat.com>
Wed, 1 Mar 2017 13:43:53 +0000 (14:43 +0100)
committerLukas Nykryn <lnykryn@redhat.com>
Thu, 6 Apr 2017 14:27:01 +0000 (16:27 +0200)
If MTU is specified, we write it for every type of device in the
beginning. There is not point writing it again for Type=ethernet
devices.

modules.d/45ifcfg/write-ifcfg.sh

index a077da1cd6de01efb0eeac6f95646dc857a7341d..fa395b3a6e2acc4528c2d3acdc11c5f3f9c19d57 100755 (executable)
@@ -210,10 +210,7 @@ for netup in /tmp/net.*.did-setup ; do
     # bridge needs different things written to ifcfg
     if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ] && [ -z "$team" ]; then
         # standard interface
-        {
-            echo "TYPE=Ethernet"
-            [ -n "$mtu" ] && echo "MTU=\"$mtu\""
-        } >> /tmp/ifcfg/ifcfg-$netif
+        echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$netif
     fi
 
     if [ -n "$vlan" ] ; then