From 9796f7f26e1aaa4341371a37028235979285c47e Mon Sep 17 00:00:00 2001 From: kaloz Date: Mon, 24 Mar 2014 11:16:05 +0000 Subject: [PATCH] [coova-chilli]: add hotplug script to restart coova when wan comes up Signed-off-by: Imre Kaloz git-svn-id: svn://svn.openwrt.org/openwrt/packages@40015 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/coova-chilli/Makefile | 4 +++- net/coova-chilli/files/chilli.hotplug | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 net/coova-chilli/files/chilli.hotplug diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile index 364bb3888..fc9c8fa2d 100644 --- a/net/coova-chilli/Makefile +++ b/net/coova-chilli/Makefile @@ -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 index 000000000..e12812b49 --- /dev/null +++ b/net/coova-chilli/files/chilli.hotplug @@ -0,0 +1,7 @@ +#!/bin/sh + +[ "$ACTION" == "ifup" ] || exit 0 + +[ "$INTERFACE" = "wan" ] && { + /etc/init.d/chilli restart +}