]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
Osstest/RedHat: fix deletion of generated network profile, keep lo redhat
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 17 Aug 2018 16:48:47 +0000 (17:48 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 17 Aug 2018 16:50:11 +0000 (17:50 +0100)
Osstest/RedHat.pm

index 728a4f8e099df7c41f00131b7e652154d580aece..b96e2588501fb8a6a422254cc3e360f127c3d527 100644 (file)
@@ -241,7 +241,10 @@ bootif=\${bootif#01-}
 bootif=\${bootif//-/:}
 
 # Remove generated network profiles
-rm -v /etc/sysconfig/network-scripts/ifcfg-*
+for profile in /etc/sysconfig/network-scripts/ifcfg-*; do
+  [ \${profile##*/ifcfg-} = lo ] && continue
+  rm -v "\$profile"
+done
 
 # Replace them with one based on MAC rather than interface name
 tee /etc/sysconfig/network-scripts/ifcfg-osstest-if0 <<ENDCFG