babeld: Added hotplug.d script to reload babeld when network interfaces are added
This commit is contained in:
parent
b8bf648c75
commit
cfd47e241c
2 changed files with 10 additions and 0 deletions
|
@ -54,6 +54,9 @@ define Package/babeld/install
|
||||||
$(INSTALL_CONF) ./files/babeld.config $(1)/etc/config/babeld
|
$(INSTALL_CONF) ./files/babeld.config $(1)/etc/config/babeld
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/babeld.init $(1)/etc/init.d/babeld
|
$(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
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,babeld))
|
$(eval $(call BuildPackage,babeld))
|
||||||
|
|
7
babeld/files/babeld.hotplug
Normal file
7
babeld/files/babeld.hotplug
Normal file
|
@ -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
|
Loading…
Reference in a new issue