diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index 781cb8fa38a1e9d860b3918052a1b7ae56508919..1d8ef927901da747a8ffb3c13d3f2246c4ee60eb 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.388 2004/03/30 20:25:41 ballen4705 Exp $ +$Id: CHANGELOG,v 1.389 2004/04/04 11:43:52 guidog Exp $ The most recent version of this file is: http://cvs.sourceforge.net/viewcvs.py/smartmontools/sm5/CHANGELOG?sortby=date&view=markup @@ -27,6 +27,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. <ADDITIONS TO THE CHANGE LOG SHOULD BE ADDED JUST BELOW HERE, PLEASE> + [GG] smartd.init.in: pass smartd_opts to smartd on startup, read distribution + specific configuration files if found + [SS] smartctl: added NetBSD support for Selective Self-tests. [BA] smartd.conf example configuration file now has all examples diff --git a/sm5/smartd.initd.in b/sm5/smartd.initd.in index cf3cdb18452c4f28c10d2ecffa03384d42ac2158..bb70e98bcb955fdd1c07f957bca975a61aec933d 100755 --- a/sm5/smartd.initd.in +++ b/sm5/smartd.initd.in @@ -2,7 +2,7 @@ # smartmontools init file for smartd # Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net> -# $Id: smartd.initd.in,v 1.21 2004/03/05 14:55:14 ballen4705 Exp $ +# $Id: smartd.initd.in,v 1.22 2004/04/04 11:43:52 guidog Exp $ # # For RedHat and cousins: # chkconfig: 2345 40 40 @@ -36,6 +36,11 @@ # Research Center), Jack Baskin School of Engineering, University of # California, Santa Cruz. http://ssrc.soe.ucsc.edu/. +# Uncomment the line below to pass options to smartd on startup. +# Note that distribution specific configuration files like +# /etc/{default,sysconfig}/smartmontools might override these +#smartd_opts="--interval=1800" + report_unsupported () { echo "Currently the smartmontools package has no init script for" echo "the $1 OS/distribution. If you can provide one or this" @@ -49,6 +54,9 @@ if [ -f /etc/redhat-release -o -f /etc/yellowdog-release -o -f /etc/mandrake-rel # Source function library . /etc/rc.d/init.d/functions + +# Source configuration file + [ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools RETVAL=0 @@ -57,7 +65,7 @@ if [ -f /etc/redhat-release -o -f /etc/yellowdog-release -o -f /etc/mandrake-rel case "$1" in start) echo -n $"Starting $prog: " - daemon /usr/sbin/smartd + daemon /usr/sbin/smartd $smartd_opts touch /var/lock/subsys/smartd echo ;; @@ -99,7 +107,7 @@ elif [ -f /etc/slackware-version ] ; then case "$1" in start) echo -n "Starting smartd: " - smartd + smartd $smartd_opts echo ;; stop) @@ -128,6 +136,8 @@ elif [ -f /etc/SuSE-release ] ; then # Existence of config file is optional SMARTD_CONFIG=/etc/smartd.conf +# source configuration file + [ -r /etc/default/smartmontools ] && . /etc/default/smartmontools # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status @@ -162,7 +172,7 @@ elif [ -f /etc/SuSE-release ] ; then # startproc should return 0, even if service is # already running to match LSB spec. - startproc $SMARTD_BIN + startproc $SMARTD_BIN $smartd_opts # Remember status and be verbose rc_status -v @@ -226,6 +236,7 @@ elif [ -f /etc/debian_version ] ; then [ -x $SMARTD ] || exit 0 RET=0 +# source configuration file [ -r /etc/default/smartmontools ] && . /etc/default/smartmontools smartd_opts="--pidfile $SMARTDPID $smartd_opts" @@ -265,7 +276,7 @@ elif uname -a | grep FreeBSD > /dev/null 2>&1 ; then case "$1" in start) - smartd -p $PID_FILE + smartd -p $PID_FILE $smartd_opts echo -n "smartd " ;; stop) @@ -289,7 +300,7 @@ elif uname -a | grep SunOS > /dev/null 2>&1 ; then case "$1" in start) - smartd -p $PID_FILE + smartd -p $PID_FILE $smartd_opts echo -n "smartd " ;; stop)