diff --git a/smartd-conf.py b/smartd-conf.py index 4dfd2ff..1691f7e 100755 --- a/smartd-conf.py +++ b/smartd-conf.py @@ -5,7 +5,9 @@ import kudzu import os drives=kudzu.probe(kudzu.CLASS_HD,kudzu.BUS_IDE|kudzu.BUS_SCSI,kudzu.PROBE_ALL) -print """# /etc/smartd.conf +print """# *SMARTD*AUTOGENERATED* /etc/smartd.conf +# Remove the line above if you have edited the file and you do not want +# it to be overwritten on the next smartd startup. # Sample configuration file for smartd. See man 5 smartd.conf. # Home page is: http://smartmontools.sourceforge.net diff --git a/smartd.initd b/smartd.initd index 2a4a6f0..1221d40 100644 --- a/smartd.initd +++ b/smartd.initd @@ -2,7 +2,7 @@ # smartmontools init file for smartd # Copyright (C) 2002-4 Bruce Allen -# $Id: smartd.initd,v 1.1 2005/01/07 06:02:58 davej Exp $ +# $Id: smartd.initd,v 1.2 2006/05/02 13:47:46 tmraz Exp $ # For RedHat and cousins: # chkconfig: 2345 40 40 @@ -32,8 +32,14 @@ SMARTD_BIN=/usr/sbin/smartd . /etc/rc.d/init.d/functions [ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools - -[ ! -f /etc/smartd.conf ] && smartd-conf.py > /etc/smartd.conf + +case "$1" in + start | reload | restart) +GEN_CONF="*SMARTD*AUTOGENERATED*" +[ ! -f /etc/smartd.conf ] || read DUMMY GEN_CONF DUMMY /etc/smartd.conf + ;; +esac RETVAL=0 diff --git a/smartmontools.spec b/smartmontools.spec index d9b71a7..f9ad500 100644 --- a/smartmontools.spec +++ b/smartmontools.spec @@ -1,7 +1,7 @@ Summary: Tools for monitoring SMART capable hard disks Name: smartmontools Version: 5.33 -Release: 7 +Release: 8 Epoch: 1 Group: System Environment/Base License: GPL @@ -72,6 +72,10 @@ exit 0 %changelog +* Tue May 2 2006 Tomas Mraz - 1:5.33-8 +- regenerate smartd.conf on every startup if the config file + is autogenerated (#190065) + * Fri Mar 24 2006 Tomas Mraz - 1:5.33-7 - add missing quotes to /etc/sysconfig/smartmontools