rpms/smartmontools/devel smartd-conf.py, 1.1, 1.2 smartmontools.spec, 1.7, 1.8

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Oct 25 09:08:41 UTC 2005


Author: davej

Update of /cvs/dist/rpms/smartmontools/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8554

Modified Files:
	smartd-conf.py smartmontools.spec 
Log Message:
Add comments to generated smartd.conf (#135397)



Index: smartd-conf.py
===================================================================
RCS file: /cvs/dist/rpms/smartmontools/devel/smartd-conf.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- smartd-conf.py	7 Jan 2005 06:02:58 -0000	1.1
+++ smartd-conf.py	25 Oct 2005 09:08:33 -0000	1.2
@@ -3,7 +3,73 @@
 # Author: Will Woods <wwoods at redhat.com>
 import kudzu
 drives=kudzu.probe(kudzu.CLASS_HD,kudzu.BUS_IDE|kudzu.BUS_SCSI,kudzu.PROBE_ALL)
+
+print """# /etc/smartd.conf
+
+# Sample configuration file for smartd.  See man 5 smartd.conf.
+# Home page is: http://smartmontools.sourceforge.net
+
+# The file gives a list of devices to monitor using smartd, with one
+# device per line. Text after a hash (#) is ignored, and you may use
+# spaces and tabs for white space. You may use '\\' to continue lines.
+
+# You can usually identify which hard disks are on your system by
+# looking in /proc/ide and in /proc/scsi.
+
+# The word DEVICESCAN will cause any remaining lines in this
+# configuration file to be ignored: it tells smartd to scan for all
+# ATA and SCSI devices.  DEVICESCAN may be followed by any of the
+# Directives listed below, which will be applied to all devices that
+# are found.  Most users should comment out DEVICESCAN and explicitly
+# list the devices that they wish to monitor.
+# DEVICESCAN
+
+# First (primary) ATA/IDE hard disk.  Monitor all attributes
+# /dev/hda -a
+
+# Monitor SMART status, ATA Error Log, Self-test log, and track
+# changes in all attributes except for attribute 194
+# /dev/hdb -H -l error -l selftest -t -I 194
+
+# A very silent check.  Only report SMART health status if it fails
+# But send an email in this case"""
+
 for drive in drives:
-    fh=open("/sys/block/%s/removable" % drive.device)
-    if fh.read(1) == '0':
-        print "/dev/%s -H -m root at localhost.localdomain" % drive.device
+    print "/dev/%s -H -m root at localhost" % drive.device
+
+print """
+# First two SCSI disks.  This will monitor everything that smartd can
+# monitor.
+# /dev/sda -d scsi
+# /dev/sdb -d scsi
+
+# HERE IS A LIST OF DIRECTIVES FOR THIS CONFIGURATION FILE
+#   -d TYPE Set the device type to one of: ata, scsi
+#   -T TYPE set the tolerance to one of: normal, permissive
+#   -o VAL  Enable/disable automatic offline tests (on/off)
+#   -S VAL  Enable/disable attribute autosave (on/off)
+#   -H      Monitor SMART Health Status, report if failed
+#   -l TYPE Monitor SMART log.  Type is one of: error, selftest
+#   -f      Monitor for failure of any 'Usage' Attributes
+#   -m ADD  Send warning email to ADD for -H, -l error, -l selftest, and -f
+#   -M TYPE Modify email warning behavior (see man page)
+#   -p      Report changes in 'Prefailure' Normalized Attributes
+#   -u      Report changes in 'Usage' Normalized Attributes
+#   -t      Equivalent to -p and -u Directives
+#   -r ID   Also report Raw values of Attribute ID with -p, -u or -t
+#   -R ID   Track changes in Attribute ID Raw value with -p, -u or -t
+#   -i ID   Ignore Attribute ID for -f Directive
+#   -I ID   Ignore Attribute ID for -p, -u or -t Directive
+#   -v N,ST Modifies labeling of Attribute N (see man page)
+#   -a      Default: equivalent to -H -f -t -l error -l selftest
+#   -F TYPE Use firmware bug workaround. Type is one of: none, samsung
+#   -P TYPE Drive-specific presets: use, ignore, show, showall
+#    #      Comment: text after a hash sign is ignored
+#    \      Line continuation character
+# Attribute ID is a decimal integer 1 <= ID <= 255
+# All but -d, -m and -M Directives are only implemented for ATA devices
+#
+# If the test string DEVICESCAN is the first uncommented text
+# then smartd will scan for devices /dev/hd[a-l] and /dev/sd[a-z]
+# DEVICESCAN may be followed by any desired Directives."""
+


Index: smartmontools.spec
===================================================================
RCS file: /cvs/dist/rpms/smartmontools/devel/smartmontools.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- smartmontools.spec	4 Aug 2005 10:21:40 -0000	1.7
+++ smartmontools.spec	25 Oct 2005 09:08:33 -0000	1.8
@@ -75,6 +75,9 @@
 
 
 %changelog
+* Tue Oct 25 2005 Dave Jones <davej at redhat.com>
+- Add comments to generated smartd.conf (#135397)
+
 * Thu Aug 04 2005 Karsten Hopp <karsten at redhat.de>
 - package all python files
 




More information about the fedora-cvs-commits mailing list