[Debconf-video-commits] r224 - fai-config/scripts/DEBCONF8

holger at alioth.debian.org holger at alioth.debian.org
Fri Aug 8 03:41:41 UTC 2008


Author: holger
Date: 2008-08-08 03:41:40 +0000 (Fri, 08 Aug 2008)
New Revision: 224

Modified:
   fai-config/scripts/DEBCONF8/50-smart-munin
Log:
make it even smarter

Modified: fai-config/scripts/DEBCONF8/50-smart-munin
===================================================================
--- fai-config/scripts/DEBCONF8/50-smart-munin	2008-08-08 03:10:38 UTC (rev 223)
+++ fai-config/scripts/DEBCONF8/50-smart-munin	2008-08-08 03:41:40 UTC (rev 224)
@@ -8,11 +8,21 @@
 #
 # smart munin plugins
 #
-for i in hda hdb hdc sda sdb sdc sdd sde sdf ; do {
-	[ -b /dev/$i ] && ln -sf /usr/share/munin/plugins/smart_ $target/etc/munin/plugins/smart_$i 
+for i in sda sdb sdc sdd sde sdf sdg ; do {
+	[ -b /dev/$i ] && {
+		ln -sf /usr/share/munin/plugins/smart_ $target/etc/munin/plugins/smart_$i 
+		grep "^/dev/$i" $target/etc/smartd.conf || echo "/dev/$i -a -d ata" >> $target/etc/smartd.conf
+	}
 } ; done
+for i in hda hdb hdc hdd ; do {
+	[ -b /dev/$i ] && {
+		ln -sf /usr/share/munin/plugins/smart_ $target/etc/munin/plugins/smart_$i 
+		grep "^/dev/$i" $target/etc/smartd.conf || echo "/dev/$i" >> $target/etc/smartd.conf
+	}
+} ; done
 ls /etc/munin/plugins/smart_??? | grep smart > /dev/null 2>&1 && {
 	sed -i "s/#start_smartd/start_smartd/" $target/etc/default/smartmontools 
+	sed -i "s/^DEVICESCAN/#DEVICESCAN/" $target/etc/smartd.conf
 	$ROOTCMD /etc/init.d/smartmontools reload
 	$ROOTCMD ln -sf /usr/share/munin/plugins/hddtemp_smartctl /etc/munin/plugins/hddtemp_smartctl
 	$ROOTCMD /etc/init.d/munin-node restart




More information about the Debconf-video-commits mailing list