aboutsummaryrefslogtreecommitdiff
path: root/net/throttled
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2008-05-05 08:08:42 +0000
committerRong-En Fan <rafan@FreeBSD.org>2008-05-05 08:08:42 +0000
commit5cf4b8ccf9f5971fc9f8972217caba541aa22012 (patch)
treee2226e2700e22cec2d308857c8041c925d839259 /net/throttled
parent1bb8ac2a10273fe49a87ad3e507ad11ebbb37ac4 (diff)
downloadports-5cf4b8ccf9f5971fc9f8972217caba541aa22012.tar.gz
ports-5cf4b8ccf9f5971fc9f8972217caba541aa22012.zip
Notes
Diffstat (limited to 'net/throttled')
-rw-r--r--net/throttled/Makefile4
-rw-r--r--net/throttled/files/throttled.in30
2 files changed, 33 insertions, 1 deletions
diff --git a/net/throttled/Makefile b/net/throttled/Makefile
index 36dd855289d8..1130e729a30f 100644
--- a/net/throttled/Makefile
+++ b/net/throttled/Makefile
@@ -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:
diff --git a/net/throttled/files/throttled.in b/net/throttled/files/throttled.in
new file mode 100644
index 000000000000..edbe5e74efcb
--- /dev/null
+++ b/net/throttled/files/throttled.in
@@ -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"