link executor: Better error message on conflicting link types.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
parent
a6b95d495c
commit
2e6b3ca1ff
1 changed files with 3 additions and 2 deletions
|
@ -32,8 +32,9 @@ pre-up)
|
|||
if [ "${IF_LINK_TYPE}" = "dummy" ]; then
|
||||
if [ -d "/sys/class/net/${IFACE}" ]; then
|
||||
iface_type=$(ip -d link show dev "${IFACE}" | head -n3 | tail -n1 | awk '{ print $1 }')
|
||||
if [ "${iface_type}" = 'dummy' ]; then
|
||||
exit 0
|
||||
if [ "${iface_type}" != 'dummy' ]; then
|
||||
echo "Interface ${IFACE} exists but is of type ${iface_type} instead of dummy"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue