[packages] reaim: use network.sh to find devices
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31950 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b69eb26300
commit
332bf9532e
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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.
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=reaim
|
||||
PKG_VERSION:=0.8
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/reaim
|
||||
|
@ -1,20 +1,20 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
# Copyright (C) 2006-2012 OpenWrt.org
|
||||
|
||||
START=60
|
||||
|
||||
IPT=/usr/sbin/iptables
|
||||
|
||||
set_rules() {
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
config_get WAN wan ifname
|
||||
. /lib/functions/network.sh
|
||||
|
||||
[ -z "$WAN" ] && exit
|
||||
$IPT $1 input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
|
||||
$IPT $1 input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
|
||||
$IPT $1 input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT
|
||||
$IPT $1 input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT
|
||||
local device
|
||||
network_get_device device wan && {
|
||||
$IPT $1 input_rule -i $device -p tcp --dport 1863:1864 -j ACCEPT
|
||||
$IPT $1 input_rule -i $device -p tcp --dport 4443 -j ACCEPT
|
||||
$IPT $1 input_rule -i $device -p tcp --dport 5566 -j ACCEPT
|
||||
$IPT $1 input_rule -i $device -p tcp --dport 40000:40099 -j ACCEPT
|
||||
}
|
||||
}
|
||||
|
||||
start() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user