freebsd-skq/etc/rc.d/rctl
Edward Tomasz Napierala ebce46b2c6 Make rctl_enable rc variable actually work. To avoid breaking existing
setups that worked before, flip the default to "YES".  Most people don't
have /etc/rctl.conf, so they won't be affected in any way.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-08-05 17:38:02 +00:00

41 lines
426 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: rctl
# BEFORE: LOGIN
# KEYWORD: nojail
. /etc/rc.subr
name="rctl"
rcvar="rctl_enable"
start_cmd="rctl_start"
stop_cmd="rctl_stop"
rctl_start()
{
if [ -f ${rctl_rules} ]; then
while read var comments
do
case ${var} in
\#*|'')
;;
*)
rctl -a "${var}"
;;
esac
done < ${rctl_rules}
fi
}
rctl_stop()
{
rctl -r :
}
load_rc_config $name
run_rc_command "$1"