link executor: Add support for dummy interfaces.
closes #49 Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
parent
36fe61d8e7
commit
e51ce613e6
2 changed files with 10 additions and 0 deletions
|
@ -66,6 +66,10 @@ the system will only respond to certain keywords by default:
|
|||
is for backwards compatibility and should not be used in new
|
||||
deployments.
|
||||
|
||||
*link-type* _link-type_
|
||||
Denotes the link-type of the interface. When set to _dummy_,
|
||||
the interface is created as a virtual dummy interfaces.
|
||||
|
||||
*requires* _interfaces_...
|
||||
Designates one or more required interfaces that must be
|
||||
brought up before configuration of the parent interface.
|
||||
|
@ -165,3 +169,4 @@ iface eth0
|
|||
# AUTHORS
|
||||
|
||||
Ariadne Conill <ariadne@dereferenced.org>
|
||||
Maximilian Wilhelm <max@sdn.clinic>
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue