[packages] radvd: hook into hotplug to reload configuration when interfaces are broug...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Jul 2011 23:37:36 +0000 (23:37 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Jul 2011 23:37:36 +0000 (23:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@27678 3c298f89-4303-0410-b956-a3cf2f4a3e73

ipv6/radvd/Makefile
ipv6/radvd/files/radvd.hotplug [new file with mode: 0644]

index e40a110..16d377c 100644 (file)
@@ -46,6 +46,8 @@ define Package/radvd/install
        $(INSTALL_CONF) ./files/radvd.config $(1)/etc/config/radvd
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/radvd.init $(1)/etc/init.d/radvd
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_DATA) ./files/radvd.hotplug $(1)/etc/hotplug.d/iface/05-radvd
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
diff --git a/ipv6/radvd/files/radvd.hotplug b/ipv6/radvd/files/radvd.hotplug
new file mode 100644 (file)
index 0000000..10a7ca8
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ "$ACTION" = ifup ]; then
+       killall -HUP radvd 2>/dev/null
+fi