forked from evolix/evocheck
IS_AUTOIF: check only statically defined interfaces
This commit is contained in:
parent
a87438a41b
commit
1638ed1884
|
@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* IS_AUTOIF: check only statically defined interfaces
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -575,8 +575,8 @@ check_autoif() {
|
||||||
interfaces=$(/sbin/ifconfig -s | tail -n +2 | grep -E -v "^(lo|vnet|docker|veth|tun|tap|macvtap|vrrp)" | cut -d " " -f 1 |tr "\n" " ")
|
interfaces=$(/sbin/ifconfig -s | tail -n +2 | grep -E -v "^(lo|vnet|docker|veth|tun|tap|macvtap|vrrp)" | cut -d " " -f 1 |tr "\n" " ")
|
||||||
fi
|
fi
|
||||||
for interface in $interfaces; do
|
for interface in $interfaces; do
|
||||||
if ! grep -Rq "^auto $interface" /etc/network/interfaces*; then
|
if grep -Rq "^iface $interface" /etc/network/interfaces* && ! grep -Rq "^auto $interface" /etc/network/interfaces*; then
|
||||||
failed "IS_AUTOIF" "Network interface \`${interface}' is not set to auto"
|
failed "IS_AUTOIF" "Network interface \`${interface}' is statically defined but not set to auto"
|
||||||
test "${VERBOSE}" = 1 || break
|
test "${VERBOSE}" = 1 || break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue