blob: 6a9772288d2e1771faa436b9f8c4084cd1f78e92 (
plain) (
blame)
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
41
42
|
#!/bin/sh
#
# PROVIDE: gmid
# REQUIRE: LOGIN SERVERS
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable gmid:
# gmid_enable (bool): Set it to "YES" to enable gmid
# Default is "NO".
# gmid_config (string): Path to gmid configuration file.
# Default is "%%PREFIX%%/etc/gmid.conf"
#
#
. /etc/rc.subr
name="gmid"
rcvar="gmid_enable"
start_precmd="gmid_checkconfig"
configtest_cmd="gmid_checkconfig"
extra_commands="configtest"
: ${gmid_enable:="NO"}
: ${gmid_config:="%%PREFIX%%/etc/gmid.conf"}
load_rc_config $name
command="%%PREFIX%%/bin/${name}"
gmid_flags="-c ${gmid_config}"
required_files="${gmid_config}"
gmid_checkconfig()
{
echo "Performing sanity check on gmid configuration:"
eval ${command} -n ${gmid_flags}
}
run_rc_command "$1"
|