Bug 122786 - [patch] rcng startup script for net/throttled
Summary: [patch] rcng startup script for net/throttled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rong-En Fan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-15 09:20 UTC by nkoch
Modified: 2008-05-05 09:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nkoch 2008-04-15 09:20:00 UTC
Could someone please add an rcng startup script to net/throttled.
See below what I derived from /etc/rc.d/ipfw. Seems to work for me.

Fix: 

#!/bin/sh
# PROVIDE: throttled
# REQUIRE: ipfw
# BEFORE: NETWORKING
# KEYWORD: nojail

. /etc/rc.subr
. /etc/network.subr

name="throttled"
rcvar=`set_rcvar`
start_precmd="throttled_precmd"
command="/usr/local/sbin/throttled-startup"
procname="/usr/local/sbin/throttled"

throttled_precmd()
{
  if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1; then
    return 1
  fi
  return 0
}

load_rc_config $name
run_rc_command "$1"
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-04-15 09:20:12 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Rong-En Fan freebsd_committer freebsd_triage 2008-05-04 06:47:24 UTC
State Changed
From-To: feedback->open

Feedback timeout. 


Comment 3 Rong-En Fan freebsd_committer freebsd_triage 2008-05-04 06:47:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rafan

Take it.
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-05-05 09:08:48 UTC
rafan       2008-05-05 08:08:42 UTC

  FreeBSD ports repository

  Modified files:
    net/throttled        Makefile 
  Added files:
    net/throttled/files  throttled.in 
  Log:
  - Add rc script, bump PORTREVISION
  
  PR:             ports/122786 (based on)
  Submitted by:   Norbert Koch <nkoch at demig.de>
  Approved by:    maintainer timeout (3 weeks)
  
  Revision  Changes    Path
  1.5       +3 -1      ports/net/throttled/Makefile
  1.1       +30 -0     ports/net/throttled/files/throttled.in (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Rong-En Fan freebsd_committer freebsd_triage 2008-05-05 09:08:54 UTC
State Changed
From-To: open->closed

Committed with changes. Thanks!