]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
write-ifcfg: do't write MTU twice for regular eth devices 204/head
authorLukas Nykryn <lnykryn@redhat.com>
Wed, 1 Mar 2017 13:43:53 +0000 (14:43 +0100)
committerLukas Nykryn <lnykryn@redhat.com>
Wed, 1 Mar 2017 13:46:12 +0000 (14:46 +0100)
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 5b0c50dd02d3e5ca8ba618cbd92182427e2e6fc2..811a847825c9400dc494594fd0edfab6f2cad03b 100755 (executable)
@@ -201,10 +201,7 @@ for netup in /tmp/net.*.did-setup ; do
     # bridge needs different things written to ifcfg
     if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; 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