diff options
author | Nick Hainke <vincent@systemli.org> | 2021-02-07 20:47:59 +0100 |
---|---|---|
committer | Polynomdivision <vincent@systemli.org> | 2021-02-08 11:38:36 +0100 |
commit | 3ebc568f18c2c5b9f73dbbdbf12f58ca885a00fd (patch) | |
tree | 31aab9be59c33c39f7e9ae11b07e6d16586f98a0 /net/wg-installer/Makefile | |
parent | 6b9fdf2e77cdccb74902b84938d1744d8b8aafea (diff) |
wg-installer: add babeld hotplug.d script
Add a hotplug.d-extension that automatically configures babeld for
meshing via wireguard interfaces.
It checks for "add" and "remove" of a wireguard interface with name
"wg_*". Depending on the action, it removes it from the babeld config
or adds the interface and reloads babeld.
Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'net/wg-installer/Makefile')
-rw-r--r-- | net/wg-installer/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/wg-installer/Makefile b/net/wg-installer/Makefile index d43407b03..b39a8903c 100644 --- a/net/wg-installer/Makefile +++ b/net/wg-installer/Makefile @@ -21,6 +21,7 @@ endef define Package/wg-installer-server $(call Package/wg-installer/Default) TITLE+= (server) + MENU:=1 DEPENDS:=+rpcd +uhttpd +uhttpd-mod-ubus +owipcalc endef @@ -47,6 +48,16 @@ define Package/wg-installer-server/postinst fi endef +define Package/wg-installer-server-hotplug-babeld + $(call Package/wg-installer-server) + DEPENDS:=wg-installer-server +endef + +define Package/wg-installer-server-hotplug-babeld/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/net/ + $(INSTALL_BIN) ./wg-server/hotplug.d/99-mesh-babeld $(1)/etc/hotplug.d/net/99-mesh-babeld +endef + define Package/wg-installer-client $(call Package/wg-installer/Default) TITLE+= (client) @@ -66,4 +77,5 @@ define Package/wg-installer-client/install endef $(eval $(call BuildPackage,wg-installer-server)) +$(eval $(call BuildPackage,wg-installer-server-hotplug-babeld)) $(eval $(call BuildPackage,wg-installer-client)) |