Add startup script, to load rules from /etc/rctl.conf.
Sponsored by: The FreeBSD Foundation Reviewed by: kib (ealier version)
This commit is contained in:
parent
6ec54a57b4
commit
cb89c25099
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220167
@ -29,7 +29,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \
|
||||
pf pflog pfsync \
|
||||
powerd power_profile ppp pppoed pwcheck \
|
||||
quota \
|
||||
random rarpd resolv rfcomm_pppd_server root \
|
||||
random rarpd rctl resolv rfcomm_pppd_server root \
|
||||
route6d routed routing rpcbind rtadvd rtsold rwho \
|
||||
savecore sdpd securelevel sendmail \
|
||||
serial sppp statd static_arp stf swap1 \
|
||||
|
39
etc/rc.d/rctl
Executable file
39
etc/rc.d/rctl
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: rctl
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: nojail
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="rctl"
|
||||
start_cmd="rctl_start"
|
||||
stop_cmd="rctl_stop"
|
||||
|
||||
rctl_start()
|
||||
{
|
||||
if [ -f /etc/rctl.conf ]; then
|
||||
while read var comments
|
||||
do
|
||||
case ${var} in
|
||||
\#*|'')
|
||||
;;
|
||||
*)
|
||||
rctl -a "${var}"
|
||||
;;
|
||||
esac
|
||||
done < /etc/rctl.conf
|
||||
fi
|
||||
}
|
||||
|
||||
rctl_stop()
|
||||
{
|
||||
|
||||
rctl -r :
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
Loading…
Reference in New Issue
Block a user