diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index 4b1c67df93168d54aa42757e7c96e2b35c61eb99..865cf828d432d2f27d38334ab93f9b9642812e1e 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.570 2006/10/09 14:34:37 chrfranke Exp $ +$Id: CHANGELOG,v 1.571 2006/10/09 15:13:21 sbrabec Exp $ The most recent version of this file is: http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup @@ -33,6 +33,8 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [SB] Minor improvements of SuSE part of init script. + [CF] Drive database: added Samsung P80 series, P120 series, SP8004H and T series. diff --git a/sm5/smartd.initd.in b/sm5/smartd.initd.in index c267f91b1b198c4732f93a39c96b19e05f81cff6..de1a61c9a2aef8e14ff4f6e0e09b799b415c87a5 100755 --- a/sm5/smartd.initd.in +++ b/sm5/smartd.initd.in @@ -2,7 +2,7 @@ # smartmontools init file for smartd # Copyright (C) 2002-6 Bruce Allen <smartmontools-support@lists.sourceforge.net> -# $Id: smartd.initd.in,v 1.33 2006/04/12 14:54:28 ballen4705 Exp $ +# $Id: smartd.initd.in,v 1.34 2006/10/09 15:13:21 sbrabec Exp $ # For RedHat and cousins: # chkconfig: 2345 40 40 @@ -171,7 +171,7 @@ elif [ -f /etc/SuSE-release ] ; then # considered a success. case "$1" in start) - echo -n "Starting smartd" + echo -n "Starting smartd " ## Start daemon with startproc(8). If this fails ## the echo return value is set appropriate. @@ -183,24 +183,40 @@ elif [ -f /etc/SuSE-release ] ; then rc_status -v ;; stop) - echo -n "Shutting down smartd" + echo -n "Shutting down smartd " killproc -TERM $SMARTD_BIN # Remember status and be verbose rc_status -v ;; - restart | force-reload) + try-restart|condrestart) + ## Do a restart only if the service was active before. + ## Note: try-restart is now part of LSB (as of 1.9). + ## RH has a similar command named condrestart. + if test "$1" = "condrestart"; then + echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" + fi + $0 status + if test $? = 0; then + $0 restart + else + rc_reset # Not running is not a failure. + fi + # Remember status and be quiet + rc_status + ;; + restart | force-reload) $0 stop $0 start ;; - reload) + reload) ## Like force-reload, but if daemon does not support ## signaling, do nothing (!) rc_failed 3 rc_status -v ;; - status) - echo -n "Checking for service smartd: " + status) + echo -n "Checking for service smartd " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. @@ -222,7 +238,7 @@ elif [ -f /etc/SuSE-release ] ; then test $SMARTD_CONFIG -nt /var/run/smartd.pid && echo reload ;; *) - echo "Usage: $0 {start|stop|status|restart|force-reload|reload|probe}" + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac