1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

- Add rc script, bump PORTREVISION

PR:		ports/122786 (based on)
Submitted by:	Norbert Koch <nkoch at demig.de>
Approved by:	maintainer timeout (3 weeks)
This commit is contained in:
Rong-En Fan 2008-05-05 08:08:42 +00:00
parent 1bb8ac2a10
commit 5cf4b8ccf9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=212636
2 changed files with 33 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= throttled
PORTVERSION= 0.4.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.intrarts.com/Files/
EXTRACT_SUFX= .tgz
@ -17,6 +17,8 @@ COMMENT= Bandwidth shaping and QoS solution
USE_GMAKE= yes
USE_RC_SUBR= ${PORTNAME}
PLIST_FILES= sbin/throttled sbin/throttled-startup
post-patch:

View File

@ -0,0 +1,30 @@
#!/bin/sh
# PROVIDE: throttled
# REQUIRE: ipfw
# BEFORE: NETWORKING
# KEYWORD: nojail
. %%RC_SUBR%%
name="throttled"
rcvar=`set_rcvar`
start_precmd="throttled_precmd"
command="%%PREFIX%%/sbin/throttled-startup"
procname="%%PREFIX%%/sbin/throttled"
throttled_precmd()
{
if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1; then
warn "IPFW must be enabled"
return 1
fi
return 0
}
load_rc_config $name
: ${throttled_enable="NO"}
run_rc_command "$1"