From cfd47e241c728d685257d59b59af770d40317ace Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Sun, 7 Sep 2014 11:48:31 +0200 Subject: [PATCH] babeld: Added hotplug.d script to reload babeld when network interfaces are added --- babeld/Makefile | 3 +++ babeld/files/babeld.hotplug | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 babeld/files/babeld.hotplug diff --git a/babeld/Makefile b/babeld/Makefile index e939310..9ecdd0f 100644 --- a/babeld/Makefile +++ b/babeld/Makefile @@ -54,6 +54,9 @@ define Package/babeld/install $(INSTALL_CONF) ./files/babeld.config $(1)/etc/config/babeld $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/babeld.init $(1)/etc/init.d/babeld + $(INSTALL_DIR) $(1)/etc/hotplug.d + $(INSTALL_DIR) $(1)/etc/hotplug.d/net + $(INSTALL_BIN) ./files/babeld.hotplug $(1)/etc/hotplug.d/net/30-babeld endef $(eval $(call BuildPackage,babeld)) diff --git a/babeld/files/babeld.hotplug b/babeld/files/babeld.hotplug new file mode 100644 index 0000000..741e575 --- /dev/null +++ b/babeld/files/babeld.hotplug @@ -0,0 +1,7 @@ +#!/bin/sh + +[ "$ACTION" = add ] || exit 0 + +logger -t babeld "Reloading babeld due to $ACTION of interface $INTERFACE" + +/etc/init.d/babeld enabled && /etc/init.d/babeld reload