Changeset 31950


Ignore:
Timestamp:
2012-05-28T17:42:41+02:00 (6 years ago)
Author:
jow
Message:

[packages] reaim: use network.sh to find devices

Location:
packages/net/reaim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/reaim/Makefile

    r28966 r31950  
    11# 
    2 # Copyright (C) 2006-2011 OpenWrt.org 
     2# Copyright (C) 2006-2012 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=reaim 
    1111PKG_VERSION:=0.8 
    12 PKG_RELEASE:=2 
     12PKG_RELEASE:=3 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/net/reaim/files/reaim.init

    r28966 r31950  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006-2011 OpenWrt.org 
     2# Copyright (C) 2006-2012 OpenWrt.org 
    33 
    44START=60 
     
    77 
    88set_rules() { 
    9         include /lib/network 
    10         scan_interfaces 
    11         config_get WAN wan ifname 
     9        . /lib/functions/network.sh 
    1210 
    13         [ -z "$WAN" ] && exit 
    14         $IPT $1 input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT 
    15         $IPT $1 input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT 
    16         $IPT $1 input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT 
    17         $IPT $1 input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT 
     11        local device 
     12        network_get_device device wan && { 
     13                $IPT $1 input_rule -i $device -p tcp --dport 1863:1864 -j ACCEPT 
     14                $IPT $1 input_rule -i $device -p tcp --dport 4443 -j ACCEPT 
     15                $IPT $1 input_rule -i $device -p tcp --dport 5566 -j ACCEPT 
     16                $IPT $1 input_rule -i $device -p tcp --dport 40000:40099 -j ACCEPT 
     17        } 
    1818} 
    1919 
Note: See TracChangeset for help on using the changeset viewer.