blob: 7610b0d6b0599d0485fc8c96607f03c6aba954c2 (
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
43
44
|
#!/bin/sh
# $FreeBSD$
# PROVIDE: smartd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
# Define these smartd_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/smartd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
smartd_enable="${smartd_enable-NO}"
smartd_pidfile="/var/run/smartd.pid"
. %%RC_SUBR%%
name="smartd"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/smartd"
load_rc_config $name
: ${smartd_config="%%PREFIX%%/etc/smartd.conf"}
: ${smartd_flags="-c ${smartd_config}"}
pidfile="${smartd_pidfile}"
required_files="${smartd_config}"
case "${smartd_flags}" in
*-p\ *)
echo "ERROR: \$smartd_flags includes -p option." \
"Please use \$smartd_pidfile instead."
exit 1
;;
*)
smartd_flags="-p ${pidfile} ${smartd_flags}"
;;
esac
run_rc_command "$1"
|