summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/rctl
blob: 567436be9da6d904e32cce5eb0a2d76962345b20 (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
#!/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"
OpenPOWER on IntegriCloud