Merge pull request #56 from BarbarossaTM/alias

link executor: Add support for interface aliases.
This commit is contained in:
Maximilian Wilhelm 2020-09-04 09:20:15 +02:00 committed by GitHub
commit 471549db4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -70,6 +70,9 @@ the system will only respond to certain keywords by default:
Denotes the link-type of the interface. When set to _dummy_, Denotes the link-type of the interface. When set to _dummy_,
the interface is created as a virtual dummy interfaces. the interface is created as a virtual dummy interfaces.
*alias* _alias_
Sets the given alias on the interface.
*requires* _interfaces_... *requires* _interfaces_...
Designates one or more required interfaces that must be Designates one or more required interfaces that must be
brought up before configuration of the parent interface. brought up before configuration of the parent interface.

View file

@ -70,6 +70,11 @@ up|down)
fi fi
${MOCK} ip link set $PHASE dev $IFACE $IF_LINK_OPTIONS ${MOCK} ip link set $PHASE dev $IFACE $IF_LINK_OPTIONS
# Set alias is configured
if [ "${IF_ALIAS}" ]; then
${MOCK} ip link set alias "${IF_ALIAS}" dev "${IFACE}"
fi
;; ;;
post-down) post-down)
if [ "${IF_LINK_TYPE}" = "dummy" ]; then if [ "${IF_LINK_TYPE}" = "dummy" ]; then