Add init files and iptables rule for ptunnel to work (#2863)
Signed-off-by: michu-at-neophob-com git-svn-id: svn://svn.openwrt.org/openwrt/packages@9818 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
1e72f5e8cd
commit
4210308eb5
@ -47,6 +47,8 @@ endef
|
|||||||
define Package/ptunnel/install
|
define Package/ptunnel/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/ptunnel.init $(1)/etc/init.d/ptunnel
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,ptunnel))
|
$(eval $(call BuildPackage,ptunnel))
|
||||||
|
14
net/ptunnel/files/ptunnel.init
Normal file
14
net/ptunnel/files/ptunnel.init
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
|
START=70
|
||||||
|
STOP=70
|
||||||
|
|
||||||
|
start() {
|
||||||
|
iptables -I OUTPUT 1 -p icmp -j ACCEPT
|
||||||
|
ptunnel -v 1 -c br-lan
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
killall ptunnel
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user