rpms/smartmontools/F-7 smartd-conf.py, 1.10, 1.11 smartd.initd, 1.4, 1.5 smartmontools.spec, 1.34, 1.35 smartmontools.sysconf, 1.2, 1.3
Tomas Smetana (tsmetana)
fedora-extras-commits at redhat.com
Tue Sep 4 12:04:40 UTC 2007
- Previous message (by thread): rpms/smartmontools/devel smartd-conf.py, 1.10, 1.11 smartd.initd, 1.5, 1.6 smartmontools.spec, 1.34, 1.35 smartmontools.sysconf, 1.2, 1.3
- Next message (by thread): rpms/ejabberd/devel ejabberd.spec,1.12,1.13 ejabberdctl,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: tsmetana
Update of /cvs/pkgs/rpms/smartmontools/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29282
Modified Files:
smartd-conf.py smartd.initd smartmontools.spec
smartmontools.sysconf
Log Message:
* Tue Sep 04 2007 Tomas Smetana <tsmetana at redhat.com> - 1:5.37-3.2
- fix #271741 smartd-conf.py should allow customization of parameters
Index: smartd-conf.py
===================================================================
RCS file: /cvs/pkgs/rpms/smartmontools/F-7/smartd-conf.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- smartd-conf.py 22 Feb 2007 12:13:39 -0000 1.10
+++ smartd-conf.py 4 Sep 2007 12:04:07 -0000 1.11
@@ -7,9 +7,9 @@
class Drive:
def __init__(self, bus, device, sysfspath):
- self.bus = bus
- self.device = device
- self.sysfspath = sysfspath
+ self.bus = bus
+ self.device = device
+ self.sysfspath = sysfspath
def listDrivesbyHAL():
drives = []
@@ -19,15 +19,15 @@
storage_udi_list = halm.FindDeviceByCapability('storage')
for udi in storage_udi_list:
- drive_obj = bus.get_object('org.freedesktop.Hal', udi)
- drive = dbus.Interface(drive_obj, 'org.freedesktop.Hal.Device')
- storage_bus = drive.GetProperty('storage.bus')
- drive_type = drive.GetProperty('storage.drive_type')
- if (storage_bus == 'ide' or storage_bus == 'scsi') and drive_type == 'disk':
- device_file = drive.GetProperty('block.device')
- sysfs_path = drive.GetProperty('linux.sysfs_path')
- drv = Drive(storage_bus, device_file, sysfs_path)
- drives += [drv]
+ drive_obj = bus.get_object('org.freedesktop.Hal', udi)
+ drive = dbus.Interface(drive_obj, 'org.freedesktop.Hal.Device')
+ storage_bus = drive.GetProperty('storage.bus')
+ drive_type = drive.GetProperty('storage.drive_type')
+ if (storage_bus == 'ide' or storage_bus == 'scsi') and drive_type == 'disk':
+ device_file = drive.GetProperty('block.device')
+ sysfs_path = drive.GetProperty('linux.sysfs_path')
+ drv = Drive(storage_bus, device_file, sysfs_path)
+ drives += [drv]
return drives
drives = listDrivesbyHAL()
@@ -66,27 +66,35 @@
def getfile(fname):
try:
- fh = open(fname)
+ fh = open(fname)
line = fh.read().rstrip()
- fh.close()
+ fh.close()
except IOError:
- line = ''
+ line = ''
return line
+try:
+ execfile('/etc/sysconfig/smartmontools')
+except IOError:
+ pass
+
for drive in drives:
if getfile("%s/removable" % drive.sysfspath) == '0':
- driver = ''
- comment = ''
- if getfile("%s/device/vendor" % drive.sysfspath) == 'ATA':
- driver = '-d ata '
- if float(getfile("/sys/module/libata/version")) < 1.20:
- comment = "# not yet supported in this kernel version\n# "
- if not comment:
- status = os.system("/usr/sbin/smartctl -s on -i %s%s 2>&1 >/dev/null" %
- (driver, drive.device))
- if not os.WIFEXITED(status) or os.WEXITSTATUS(status) != 0:
- comment = "# smartctl -i returns error for this drive\n# "
- print "%s%s %s-H -m root" % (comment, drive.device, driver)
+ driver = ''
+ comment = ''
+ if getfile("%s/device/vendor" % drive.sysfspath) == 'ATA':
+ driver = '-d ata'
+ if float(getfile("/sys/module/libata/version")) < 1.20:
+ comment = "# not yet supported in this kernel version\n# "
+ if not comment:
+ status = os.system("/usr/sbin/smartctl -s on -i %s%s 2>&1 >/dev/null" %
+ (driver, drive.device))
+ if not os.WIFEXITED(status) or os.WEXITSTATUS(status) != 0:
+ comment = "# smartctl -i returns error for this drive\n# "
+ try:
+ print "%s%s %s %s" % (comment, drive.device, driver, smartd_conf_opts)
+ except NameError:
+ print "%s%s %s -H -m root" % (comment, drive.device, driver)
print """
# First two SCSI disks. This will monitor everything that smartd can
Index: smartd.initd
===================================================================
RCS file: /cvs/pkgs/rpms/smartmontools/F-7/smartd.initd,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- smartd.initd 7 Nov 2006 10:19:40 -0000 1.4
+++ smartd.initd 4 Sep 2007 12:04:07 -0000 1.5
@@ -8,7 +8,6 @@
# chkconfig: 2345 99 01
# description: Self Monitoring and Reporting Technology (SMART) Daemon
# processname: smartd
-
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
Index: smartmontools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/smartmontools/F-7/smartmontools.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- smartmontools.spec 20 Aug 2007 11:38:43 -0000 1.34
+++ smartmontools.spec 4 Sep 2007 12:04:07 -0000 1.35
@@ -1,7 +1,7 @@
Summary: Tools for monitoring SMART capable hard disks
Name: smartmontools
Version: 5.37
-Release: 3.1%{?dist}
+Release: 3.2%{?dist}
Epoch: 1
Group: System Environment/Base
License: GPLv2+
@@ -80,6 +80,9 @@
%changelog
+* Tue Sep 04 2007 Tomas Smetana <tsmetana at redhat.com> - 1:5.37-3.2
+- fix #271741 smartd-conf.py should allow customization of parameters
+
* Mon Aug 20 2007 Tomas Smetana <tsmetana at redhat.com> - 1:5.37-3.1
- license tag update
- add support for 24 disks on 3ware RAID controllers (related #252055)
Index: smartmontools.sysconf
===================================================================
RCS file: /cvs/pkgs/rpms/smartmontools/F-7/smartmontools.sysconf,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- smartmontools.sysconf 24 Mar 2006 17:50:08 -0000 1.2
+++ smartmontools.sysconf 4 Sep 2007 12:04:07 -0000 1.3
@@ -1,2 +1,4 @@
# command line options for smartd
smartd_opts="-q never"
+# autogenerated config file options
+# smartd_conf_opts="-H -m root"
- Previous message (by thread): rpms/smartmontools/devel smartd-conf.py, 1.10, 1.11 smartd.initd, 1.5, 1.6 smartmontools.spec, 1.34, 1.35 smartmontools.sysconf, 1.2, 1.3
- Next message (by thread): rpms/ejabberd/devel ejabberd.spec,1.12,1.13 ejabberdctl,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list