cb89c25099
Sponsored by: The FreeBSD Foundation Reviewed by: kib (ealier version)
40 lines
408 B
Bash
Executable File
40 lines
408 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 /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"
|