Opened 11 years ago
Closed 10 years ago
#7441 closed enhancement (fixed)
Add smartmontools
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | 7.10 |
| Component: | BOOK | Version: | SVN |
| Severity: | medium | Keywords: | |
| Cc: |
Description
After 7.9 is released, add this package.
http://sourceforge.net/projects/smartmontools/files/smartmontools/6.4/
./configure --prefix=/usr \
--sysconfdir=/etc \
--docdir=/usr/share/doc/smartmontools-6.4 \
--with-initscriptdir=no
make
sudo make install
Init script looks like:
#! /bin/sh
# smartmontools init file for smartd
### BEGIN INIT INFO
# Provides: smartd
# Required-Start: $syslog $remote_fs
# Should-Start: sendmail
# Required-Stop: $syslog $remote_fs
# Should-Stop: sendmail
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Monitors disk and tape health via S.M.A.R.T.
# Description: Start S.M.A.R.T. disk and tape monitor.
### END INIT INFO
source /lib/lsb/init-functions
# Source configuration file. This should define the shell variable smartd_opts
[ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools
SMARTD_BIN=/usr/sbin/smartd
pidfile=/run/lock/smartd
config=/etc/smartd.conf
case "$1" in
start)
log_info_msg "Starting smartd... "
if [ ! -f $config ]; then
log_info_msg2 "configuration file $config missing"
failed=1
elif start_daemon $SMARTD_BIN $smartd_opts; then
touch $pidfile
else
failed=1
fi
(exit $failed)
evaluate_retval
;;
stop)
log_info_msg "Stopping smartd... "
killproc $SMARTD_BIN
evaluate_retval
rm -f $pidfile
;;
report)
log_info_msg "Checking SMART devices now... "
killproc $SMARTD_BIN -USR1
evaluate_retval
;;
reload)
log_info_msg "Reloading smartd daemon configuration... "
killproc $SMARTD_BIN -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc $SMARTD_BIN
;;
*)
echo "Usage: $0 {start|stop|report|reload|restart|status}"
exit 1
;;
esac
Change History (2)
comment:1 by , 10 years ago
| Milestone: | future → 7.10 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

Fixed at revision 17259.