Improve AUTOIF test for virtualization

This commit is contained in:
Gregory Colpart 2014-07-21 15:03:12 +02:00
parent b79a56710b
commit 56cff02585

View file

@ -300,7 +300,7 @@ if [ -e /etc/debian_version ]; then
# Verification interface en auto
if [ "$IS_AUTOIF" = 1 ]; then
for interface in `/sbin/ifconfig -s |tail -n +2 |grep -v "^lo" |cut -d " " -f 1 |tr "\n" " "`; do
for interface in `/sbin/ifconfig -s |tail -n +2 |egrep -v "^(lo|vnet)" |cut -d " " -f 1 |tr "\n" " "`; do
grep -q "^auto $interface" /etc/network/interfaces || (echo 'IS_AUTOIF FAILED!' && break)
done
fi