#
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=ptunnel
PKG_VERSION:=0.71
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=PingTunnel-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.cs.uit.no/~daniels/PingTunnel
#!/bin/sh /etc/rc.common
-# Copyright (C) 2007-2011 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
START=70
local section="$1"
config_get interface "$section" interface
- config_get ifname "$interface" ifname
-
- [ -z "$ifname" ] && {
+ network_get_device ifname "$interface" || {
echo "${initscript}: Error: Interface '$interface' not found" 1>&2
return 1
}
}
start() {
- include /lib/network
- scan_interfaces
+ . /lib/functions/network.sh
config_load 'ptunnel'
config_foreach start_instance 'ptunnel'
- iptables -I OUTPUT 1 -p icmp -j ACCEPT 2> /dev/null
+ iptables -I OUTPUT 1 -p icmp -j ACCEPT 2>/dev/null
}
stop() {
service_stop /usr/sbin/ptunnel
+ iptables -D OUTPUT -p icmp -j ACCEPT 2>/dev/null
}