wshaper: start wshaper on ifup 1030/head
authorStanislav German-Evtushenko <ginermail@gmail.com>
Wed, 11 Mar 2015 21:38:14 +0000 (00:38 +0300)
committerStanislav German-Evtushenko <ginermail@gmail.com>
Wed, 11 Mar 2015 22:48:05 +0000 (01:48 +0300)
net/wshaper/Makefile
net/wshaper/files/wshaper.iface [new file with mode: 0644]

index 5007a87355d75d150ab9b2779c04c8888afb8b7e..65b4045be5f927d6b07d95571e8fc8ba43210f2e 100644 (file)
@@ -44,9 +44,10 @@ define Build/Compile
 endef
 
 define Package/wshaper/install
-       $(INSTALL_DIR) $(1)/usr/sbin/ $(1)/etc/init.d $(1)/etc/config
+       $(INSTALL_DIR) $(1)/usr/sbin/ $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface
        $(INSTALL_BIN) ./files/wshaper.htb $(1)/usr/sbin/
        $(INSTALL_BIN) ./files/wshaper.init $(1)/etc/init.d/wshaper
+       $(INSTALL_BIN) ./files/wshaper.iface $(1)/etc/hotplug.d/iface/10-wshaper
        $(INSTALL_DATA) ./files/wshaper.config $(1)/etc/config/wshaper
 endef
 
diff --git a/net/wshaper/files/wshaper.iface b/net/wshaper/files/wshaper.iface
new file mode 100644 (file)
index 0000000..2964005
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+[ "$ACTION" = ifup ] && /etc/init.d/wshaper enabled && /etc/init.d/wshaper start || exit 0