link executor: Add support for dummy interfaces.

closes #49

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-08-26 23:02:48 +02:00
parent 36fe61d8e7
commit e51ce613e6
2 changed files with 10 additions and 0 deletions

View file

@ -32,6 +32,11 @@ is_vlan() {
}
case "$PHASE" in
pre-up)
if [ "${IF_LINK_TYPE}" = "dummy" ]; then
ip link add "${IFACE}" type dummy
fi
;;
up|down)
if is_vlan; then
ADD_DEL="add"