]>
git.proxmox.com Git - mirror_smartmontools-debian.git/blob - smartd.freebsd.initd.in
2 # $FreeBSD: ports/sysutils/smartmontools/files/smartd.in,v 1.2 2010/03/27 00:15:05 dougb Exp $
7 # KEYWORD: shutdown nojail
9 # Define these smartd_* variables in one of these files:
12 # /etc/rc.conf.d/smartd
14 # DO NOT CHANGE THESE DEFAULT VALUES HERE
16 smartd_enable
="${smartd_enable-NO}"
17 smartd_pidfile
="/var/run/smartd.pid"
23 command="/usr/local/sbin/smartd"
24 extra_commands
="reload report"
25 reload_cmd
="smartd_reload"
26 report_cmd
="smartd_report"
30 rc_pid
=$
(check_pidfile
$pidfile $command)
31 if [ -z "$rc_pid" ]; then
32 [ -n "$rc_fast" ] && return 0
36 echo 'Reloading smartd.'
42 rc_pid
=$
(check_pidfile
$pidfile $command)
43 if [ -z "$rc_pid" ]; then
44 [ -n "$rc_fast" ] && return 0
48 echo 'Checking SMART devices now.'
54 : ${smartd_config="/usr/local/etc/smartd.conf"}
55 : ${smartd_flags="-c ${smartd_config}"}
57 pidfile
="${smartd_pidfile}"
58 required_files
="${smartd_config}"
60 case "${smartd_flags}" in
62 echo "ERROR: \$smartd_flags includes -p option." \
63 "Please use \$smartd_pidfile instead."
67 smartd_flags
="-p ${pidfile} ${smartd_flags}"