install: Add ability to append network config
* If a network tail file is found, append to the generated config. * This functionality allows users to create a tail file @ /etc/systemd/network/template/dosync-${interface}.network.tail to add additional options to the network config. * Example use case: Adding "Tunnel=name-of-tunnel" to the eth0 interface file to signal systemd-networkd to bring up a tunnel using the eth0 interface.
This commit is contained in:
parent
0c6f25d25e
commit
87f7960687
|
@ -912,6 +912,11 @@ process_interface() {
|
|||
fi
|
||||
log "Added IPv6 address ${address}/${prefix} on ${interface}."
|
||||
fi
|
||||
local network_tail=/etc/systemd/network/template/dosync-${interface}.network.tail
|
||||
if [[ -r "${network_tail}" ]]; then
|
||||
cat ${network_tail}
|
||||
log "Appended user specified config for ${interface}."
|
||||
fi
|
||||
} > /run/systemd/network/dosync-${interface}.network
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue