init script cleanup, use /etc/rc.d/ for enabled scripts, /etc/init.d/<pkgname> (enable|disable) manages symlinks

git-svn-id: svn://svn.openwrt.org/openwrt/packages@5128 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2006-10-15 21:03:30 +00:00
parent d42adbf1a5
commit 7608ba449f
84 changed files with 464 additions and 474 deletions

View File

@ -1,16 +1,17 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=60
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=reaim
DESC="Transparent proxy for IM behind NAT"
IPT=/usr/sbin/iptables
include /lib/network
scan_interfaces
config_get WAN wan ifname
set_rules() {
include /lib/network
scan_interfaces
config_get WAN wan ifname
[ -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