freebsd-skq/etc/rc.d/rctl
bdrewery 1aa40d8e49 MFC r261931,r261932:
Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl

Approved by:	bapt (mentor, implicit)
2014-02-23 20:04:29 +00:00

40 lines
406 B
Bash
Executable File

#!/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 ${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"