From: Anthony PERARD Date: Fri, 17 Aug 2018 16:48:47 +0000 (+0100) Subject: Osstest/RedHat: fix deletion of generated network profile, keep lo X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Fredhat;p=people%2Faperard%2Fosstest.git Osstest/RedHat: fix deletion of generated network profile, keep lo --- diff --git a/Osstest/RedHat.pm b/Osstest/RedHat.pm index 728a4f8e..b96e2588 100644 --- a/Osstest/RedHat.pm +++ b/Osstest/RedHat.pm @@ -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 <