ifcfg/write-ifcfg.sh: do not source net.*.override, if it doesn't exist
authorHarald Hoyer <harald@redhat.com>
Tue, 10 May 2011 08:55:48 +0000 (10:55 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 10 May 2011 08:55:48 +0000 (10:55 +0200)
modules.d/45ifcfg/write-ifcfg.sh

index f495e24..ec47897 100755 (executable)
@@ -42,7 +42,7 @@ for netif in $IFACES ; do
         else
             echo "BOOTPROTO=none" 
         # If we've booted with static ip= lines, the override file is there
-            . /tmp/net.$netif.override 
+            [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override 
             echo "IPADDR=$ip"
             echo "NETMASK=$mask"
             [ -n "$gw" ] && echo "GATEWAY=$gw"