summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/rctl
blob: 85c0c2086a5e96c537dc58bbd34a6ed648f27662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/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
			\#*|'')
				;;
			*)
				echo "${var}"
				;;
			esac
		done < ${rctl_rules} | xargs rctl -a
	fi
}

rctl_stop()
{

	rctl -r :
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud