Skip to content
Snippets Groups Projects
Commit 8938c1bd authored by sbrabec's avatar sbrabec
Browse files

Minor improvements of SuSE part of init script.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2279 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 243c67e5
Branches
No related tags found
No related merge requests found
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.
......
......@@ -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
......@@ -189,6 +189,22 @@ elif [ -f /etc/SuSE-release ] ; then
# Remember status and be verbose
rc_status -v
;;
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
......@@ -200,7 +216,7 @@ elif [ -f /etc/SuSE-release ] ; then
rc_status -v
;;
status)
echo -n "Checking for service smartd: "
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment