[coova-chilli]: add hotplug script to restart coova when wan comes up
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 24 Mar 2014 11:16:05 +0000 (11:16 +0000)
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 24 Mar 2014 11:16:05 +0000 (11:16 +0000)
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@40015 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/coova-chilli/Makefile
net/coova-chilli/files/chilli.hotplug [new file with mode: 0644]

index 364bb38..fc9c8fa 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coova-chilli
 PKG_VERSION:=1.3.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ap.coova.org/chilli
@@ -79,6 +79,8 @@ define Package/coova-chilli/install
        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/chilli
        $(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_DATA) ./files/chilli.hotplug $(1)/etc/hotplug.d/iface/30-chilli
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/lib/
diff --git a/net/coova-chilli/files/chilli.hotplug b/net/coova-chilli/files/chilli.hotplug
new file mode 100644 (file)
index 0000000..e12812b
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ "$ACTION" == "ifup" ] || exit 0
+
+[ "$INTERFACE" = "wan" ] && {
+       /etc/init.d/chilli restart
+}