From 87f7960687984bd60d2c957471b2269359a7f6c8 Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Wed, 8 Jul 2015 01:31:52 -0700 Subject: [PATCH] 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. --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index bb6431b..d6119c4 100755 --- a/install.sh +++ b/install.sh @@ -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 }