[-]
[+]
|
Deleted |
hddtemp.changes
|
@@ -1,5 +0,0 @@
--------------------------------------------------------------------
-Tue Jan 16 13:28:51 CET 2007 - mskibbe@suse.de
-
-- create package
-
|
[-]
[+]
|
Changed |
hddtemp.spec
^
|
|
[-]
[+]
|
Added |
hddtemp-db.patch
^
|
@@ -0,0 +1,158 @@
+--- hddtemp.db.orig 2008-04-26 21:41:30.000000000 +0200
++++ hddtemp.db 2008-04-26 23:02:25.000000000 +0200
+@@ -80,6 +80,8 @@
+
+ "FUJITSU MHV2100AH" 194 C "FUJITSU MHV2100AH"
+ "FUJITSU MHV2100AT" 194 C "FUJITSU MHV2100AT"
++"FUJITSU MHV2100BH" 194 C "FUJITSU MHV2100BH"
++"FUJITSU MHV2060AH" 194 C "FUJITSU MHV2060AH"
+ "FUJITSU MHV2080[AB]H" 194 C "FUJITSU MHV2080AH"
+
+ "FUJITSU MPF3204AH" 194 C "Fujitsu MPF3204AH"
+@@ -197,6 +199,7 @@
+ "Maxtor 6V320F0" 194 C "Maxtor Diamond Max 10 SATA II 320 GB"
+ "Maxtor 6Y(06|08|12|16|20|25)0[LPM]0" 194 C "Maxtor DiamondMax Plus 9"
+ "Maxtor 7L300[RS]0" 194 C "Maxtor 7L300R0 MaxLine+III 300GB 7200rpm"
++"Maxtor 7[LV](25|30)0[RSF]0" 194 C "Maxtor MaxLineIII 250/300GB"
+ "Maxtor 7Y250[PM]0" 194 C "Maxtor MaXLine Plus II 250GB 7200RPM"
+ "Maxtor 94098U8" 11 C "Maxtor DiamondMax 40 94098U8"
+
+@@ -247,11 +250,12 @@
+ ############# Samsung drives
+ ########################################
+ # somenone reported a problem with the SP8004H which reports a temperature
+-# 10°C below the ambient temperature
++# 10�C below the ambient temperature
+ "SAMSUNG HA(200|250)JC" 194 C "Samsung SpinPoint V120CE series"
+ "SAMSUNG HD160JJ" 194 C "Samsung 160GB, 7200RPM, 8MB cache, SATA"
+ "SAMSUNG HD160JJ/P" 194 C "Samsung SpinPoint P80 SD 160GB (7200RPM, 8MB cache)"
+ "SAMSUNG HD[30|32|40][01]L[DJ]" 194 C "Samsung SpinPoint T133 series (300-400MB)"
++"SAMSUNG HD300LJ" 194 C "Samsung SpinPoint T series"
+ "SAMSUNG HD250KD" 194 C "Samsung SpinPoint T133 series (250 MB PATA)"
+ "SAMSUNG HD321KJ" 194 C "Samsung Spinpoint T166 (7200RPM, 16MB cache) - SATA"
+ "SAMSUNG HD501LJ" 194 C "Samsung HD501LJ"
+@@ -301,6 +305,7 @@
+ "ST340014A" 194 C "Seagate Barracuda 7200.7 40Gb"
+ "ST340015A" 194 C "Seagate Barracuda 5400.1 40GB"
+ "ST340016A" 194 C "Seagate ST340016A"
++"ST3400633(A|AS)" 194 C "Seagate Barracuda 7200.9 400 GB"
+ "ST340810A" 194 C "Seagate U Series 40810 (40Gb, Ultra ATA/100, 5400 rpm)"
+ "ST340823A" 194 C "Seagate U Series 5 40823"
+ "ST340824A" 194 C "Seagate Barracuda III"
+@@ -325,22 +330,30 @@
+ "ST3120026A" 194 C "Seagate Barracuda V ST3120026A"
+ "ST3160021A" 194 C "Seagate Barracuda 7200.7 - ST3160021A"
+ "ST3160023(A|AS)" 194 C "Seagate Barracuda V ST3160023A and AS (160Gb, ATA100 or Serial ATA)"
++"ST316081[12](A|AS)" 194 C "Seagate Barracuda 7200.9 160GB"
+ "ST3160827AS" 194 C "Seagate Barracuda 7200.7 160GB (Serial ATA)"
+ "ST3200021A" 194 C "Seagate Barracuda 7200.7 Plus 200GB"
++"ST3200[68]20(A|AS)" 194 C "Seagate Barracuda 7200.10 200GB"
+ "ST3200822(A|AS)" 194 C "Seagate Barracuda 7200.7 Plus 200GB (PATA or SATA)"
+-"ST3200826A" 194 C "Seagate Barracuda 7200.8 200Gb"
++"ST3200826A" 194 C "Seagate Barracuda 7200.8 200GB"
+ "ST3250623A" 194 C "Seagate Barracuda 7200.16 250GB"
++"ST3250624AS" 194 C "Seagate Barracuda 7200.9 250GB SATA"
++"ST3250624NS" 194 C "Seagate NL35 SATA (RAID-Edition) 7200 250GB"
+ "ST3250823A" 194 C "Seagate Barracuda 7200.8 250GB"
+-"ST3250823A" 194 C "Seagate Barracuda 7200.7 Plus 250GB"
+ "ST3250823NS" 194 C "Seagate NL35 SATA (RAID-Edition) 7200 250GB"
++"ST3300[68]20(A|AS)" 194 C "Seagate Barracuda 7200.10 300GB"
+ "ST3300831A" 194 C "Seagate 300GB ST3300831A"
+ "ST3400832A" 194 C "Seagate Barracuda 7200.8 Plus 400GB"
++"ST3320[68]20(A|AS)" 194 C "Seagate Barracuda 7200.10 320GB"
++"ST3400[68]20(A|AS)" 194 C "Seagate Barracuda 7200.10 400GB"
+ "ST3400633(A|AS)" 194 C "Seagate Barracuda 7200.7 400 GB"
+ "ST3500630NS" 194 C "Seagate"
+ "ST3400632NS" 194 C "Seagate"
+ "ST3320620AS" 194 C "Seagate Barracuda 7200.7 320 GB"
+ "ST3500630AS" 194 C "Seagate Barracuda 7200.7 500 GB"
+-"ST3802110A" 194 C "Seagate Barracuda 7200.9 80 GB"
++"ST3500[68]30(A|AS)" 194 C "Seagate Barracuda 7200.10 500GB"
++"ST3750[68]40(A|AS)" 194 C "Seagate Barracuda 7200.10 750GB"
++"ST380[28]110(A|AS)" 194 C "Seagate Barracuda 7200.9 80 GB"
+ "ST910021A" 194 C "Seagate Momentus 7200.1 100GB"
+ "ST910082[35]A" 194 C "Seagate Momentus 5400.2 100GB"
+ "ST9120821A" 194 C "Seagate Momentus 5400.2 120GB"
+@@ -351,12 +364,14 @@
+ "ST960822A" 194 C "Seagate Momentus 5400.2 60GB"
+ "ST96812AS" 194 C "Seagate Momentus 5400.2 60GB SATA"
+ "ST9808211A" 194 C "Seagate Momentus 5400.2 80GB"
++"ST98823AS" 194 C "Seagate Momentus 5400.2 80GB SATA"
+
+ ########################################
+ ############# TOSHIBA Laptops
+ ########################################
+ "MK4313MAT" 220 C "Toshiba MK4313MAT"
+ "TOSHIBA MK1032GAX" 194 C "Toshiba MK1032GAX"
++"TOSHIBA MK1032GSX" 194 C "Toshiba MK1032GSX"
+ "TOSHIBA MK1517GAP" 0 C "Toshiba MK1517GAP"
+ "TOSHIBA MK2018GAS" 226 F "Toshiba MK2018GAS"
+ "TOSHIBA MK2023GAS" 194 C "Toshiba MK2023GAS"
+@@ -377,6 +392,7 @@
+ "TOSHIBA MK6026GAX" 194 C "Toshiba MK6026GAX"
+ "TOSHIBA MK8025GAS" 194 C "Toshiba MK8025GAS"
+ "TOSHIBA MK8026GAX" 194 C "Toshiba MK8026GAX"
++"TOSHIBA MK8032GSX" 194 C "Toshiba MK8032GSX"
+
+ "MK4025GAS" 194 C "Toshiba MK4025GAS"
+
+@@ -397,7 +413,7 @@
+ "WDC WD300BB-00CAA0" 0 C "Western Digital WD300BB"
+ "WDC WD360GD-00FNA0" 194 C "Western Digital SATA Raptor 36.7GB"
+ "WDC WD400BB-00CAA0" 0 C "Western Digital 400BB-00CAA0"
+-"WDC WD400BB-00J[KH]A0" 194 C "Western Digital Caviar WD400BB"
++"WDC WD400BB-00[DJ][KH]A0" 194 C "Western Digital Caviar WD400BB"
+ "WDC WD400BB-23JHC0" 194 C "Western Digital 23JHC0"
+ #"WDC WD400BB-00GFA0" 0 C ""
+ "WDC WD400BB-55HEA0" 194 C "Western Digital Caviar WD400BB"
+@@ -416,7 +432,7 @@
+ "WDC WD600VE-75HDT0" 194 C "Western Digital 600VE-75HDT0"
+ "WDC WD600VE-00HDT0" 194 C "Western Digital 600VE-00HDT0"
+ "WDC WD740GD-00FL21.0" 194 C "Western Digital SATA Raptor"
+-"WDC WD740GD-([05]0FL[AC]0|75FLA1)" 194 C "Western Digital SATA Raptor 74GB 8MB"
++"WDC WD740GD-([05]0FL[AC][01]|75FLA1)" 194 C "Western Digital SATA Raptor 74GB 8MB"
+ "WDC WD800BB-00CAA1" 0 C "Western Digital WD800BB-00CAA1"
+ "WDC WD800BB-(00|22)DKA0" 194 C "Western Digital WD800BB 80 Go"
+ "WDC WD800BB-32CCB0" 194 C "Western Digital 800BB-32CCB0"
+@@ -428,31 +444,37 @@
+ "WDC WD800JB-00CRA1" 0 C "Western Digital Caviar WD800JB"
+ "WDC WD800JB-00(ET|FM|FS)A0" 194 C "Western Digital Caviar 80GB Special Edition 8MB"
+ "WDC WD800JB-00JJ[AC]0" 194 C "Western Digital WD800JB"
+-"WDC WD800JD-(00|55)(HK|JR)A0" 194 C "Western Digital SATA 80GB, 8MB Cache"
++"WDC WD800JD-(00|55|75)(HK|JR|JN)[AC]0" 194 C "Western Digital SATA 80GB, 8MB Cache"
+ "WDC WD800JD-00(HK|JN)A0" 194 C "Western Digital SATA 80GB, 8MB Cache"
+ "WDC WD800LB-(00|55)DNA0" 194 C "Western Digital Caviar WD800LB 80 Go ATA-100"
+ "WDC WD800VE-07HDT0" 194 C "Western Digital 800VE-07HDT0"
+ "WDC WD1200BB-00(FTA|GUA)0" 194 C "Western Digital Caviar EIDE 2MB Cache"
+-"WDC WD1200JB-00(EV|FU|GV)A0" 194 C "Western Digital Caviar 120GB Special Edition 8MB"
++"WDC WD1200JB-00(EV|FU|GV|RE)A0" 194 C "Western Digital Caviar 120GB Special Edition 8MB"
+ "WDC WD1200JB-22GVA0" 194 C "Western Digital Caviar 120GB"
+-"WDC WD1200JD-00(GBB|HBC)0" 194 C "Western Digital WD1200JD"
++"WDC WD1200JD-00(GBB|HBC|FYB)0" 194 C "Western Digital WD1200JD"
+ "WDC WD1200LB-55EDA0" 194 C "Western Digital WD1220LB"
+ "WDC WD1200SB-01KB[AC]0" 194 C "Western Digital Caviar RE (Raid Edition) 120 GB"
++"WDC WD1500ADFD-00NLR0" 194 C "Western Digital SATA Raptor 150GB 16MB"
+ "WDC WD1600BB-00DWA0" 194 C "Western Digital Caviar WD1600BB"
+ "WDC WD1600JB-(00EV|00FU|00GV|22GV|75GV)A0" 194 C "Western Digital Caviar 160GB Special Edition 8MB"
+ "WDC WD2000BB-00FTA0" 194 C "Western Digital WD2000BB"
+ "WDC WD2000JB-(00EV|32EV|34EV|00FU|00GV|55GV|98GV|00KF)A0" 194 C "Western Digital Caviar 200GB Special Edition 8MB"
+ "WDC WD2000JB-00GVC0" 194 C "Western Digital WD2000JB"
++"WDC WD2000JD-00FYB0" 194 C "Western Digital WD2000JD"
+ "WDC WD2000JS-00MHB1" 194 C "Western Digital SATA 200GB"
+ "WDC WD2500JB-(00RE|00EV|00FU|32FU|00GV|55GV)A0" 194 C "Western Digital Caviar 250GB Special Edition 8MB"
+ "WDC WD2500JB-00GVC0" 194 C "Western Digital 250GB"
+-"WDC WD2500JD-(00G|32H)BB0" 194 C "Western Digital SATA Caviar 250GB Special Edition 8MB"
++"WDC WD2500JD-(00G|32H|75H)BB0" 194 C "Western Digital SATA Caviar 250GB Special Edition 8MB"
+ "WDC WD2500JD-40HBC0" 194 C "Western Digital WD2500JD-40HBC0"
+ "WDC WD2500PB-98FBA0" 194 C "Western Digital Caviar 250GB Special Edition 8MB"
+ "WDC WD2500PD-00FZB1" 194 C "Western Digital WD2500PD-00FZB1"
+ "WDC WD2500SD-01KCB0" 194 C "Western Digital Caviar RE 250GB 8MB"
++"WDC WD2500KS-00MJB0" 194 C "Western Digital Caviar SE16 250GB 16MB"
++"WDC WD2500YD-01NVB1" 194 C "Western Digital Caviar RE 250GB 16MB"
+ "WDC WD3000JB-00KFA0" 194 C "Western Digital WD3000JB"
+ "WDC WD3200JB-00KFA0" 194 C "Western Digital Caviar 320GB 8MB"
++"WDC WD3200KS-00PFB0" 194 C "Western Digital Caviar 320GB 16MB"
++"WDC WD3200SD-01KNB0" 194 C "Western Digital Caviar RE 320GB SATA 8MB"
+ "WDC WD4000KD-00NAB0" 194 C "Western Digital Caviar SE16 400GB 16MB"
+ "WDC WD4000YR-01PLB0" 194 C "Western Digital Caviar RE2 400GB 16MB"
+ "WD4000YS-01MPB0" 194 C "Western Digital RE2 7200 SATA II 400 GB"
|
[-]
[+]
|
Added |
hddtemp_0.3-beta15-45.diff.bz2
^
|
@@ -0,0 +1,6989 @@
+--- hddtemp-0.3-beta15.orig/README
++++ hddtemp-0.3-beta15/README
+@@ -28,10 +28,7 @@
+ INFORMATION
+ ===========
+ hddtemp accesses to the SATA disks via ATA pass-through commands (defined in
+-T10/04-262r7). At the time of writing (kernel 2.6.11-rc5 has just been
+-released), kernels doesn't have support for ATA pass-through. You have to
+-update the libata driver with a newer version that could be found on:
+-http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/
++T10/04-262r7). Only kernel >= 2.6.16 have this support.
+
+ In daemon mode, hddtemp doesn't allow too much query at a time. If the interval
+ between two query is inferior to 1 minute, hddtemp will give the previous value
+--- hddtemp-0.3-beta15.orig/po/fr.po
++++ hddtemp-0.3-beta15/po/fr.po
+@@ -7,8 +7,8 @@
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: fr\n"
+-"Report-Msgid-Bugs-To: hddtemp@guzu.net\n"
+-"POT-Creation-Date: 2005-02-25 22:43+0100\n"
++"Report-Msgid-Bugs-To: \n"
++"POT-Creation-Date: 2006-06-29 16:24+0200\n"
+ "PO-Revision-Date: 2003-06-03 00:58GMT+1\n"
+ "Last-Translator: Aurelien Jarno <aurelien@aurel32.net>\n"
+ "Language-Team: FRANCAIS <fr@li.org>\n"
+@@ -17,23 +17,7 @@
+ "Content-Transfer-Encoding: 8bit\n"
+ "X-Generator: KBabel 1.0.1\n"
+
+-#: src/hddtemp.c:112
+-#, c-format
+-msgid ""
+-"\n"
+-"Regexp%s| Value | Description\n"
+-"------%s---------------------\n"
+-msgstr ""
+-"\n"
+-"Regexp%s| Valeur | Description\n"
+-"------%s----------------------\n"
+-
+-#: src/hddtemp.c:118
+-#, c-format
+-msgid "%s%s| %5d | %s\n"
+-msgstr "%s%s| %5d | %s\n"
+-
+-#: src/hddtemp.c:161
++#: src/hddtemp.c:156
+ #, c-format
+ msgid ""
+ "\n"
+@@ -46,7 +30,7 @@
+ "Modèle: %s\n"
+ "\n"
+
+-#: src/hddtemp.c:188
++#: src/hddtemp.c:189
+ #, c-format
+ msgid ""
+ "WARNING: Drive %s doesn't seem to have a temperature sensor.\n"
+@@ -60,75 +44,60 @@
+ "net).\n"
+ "ATTENTION : Voir les options --help, --debug et --drivebase.\n"
+
+-#: src/hddtemp.c:192
++#: src/hddtemp.c:197
+ #, c-format
+ msgid "%s: %s: no sensor\n"
+ msgstr "%s: %s : pas de capteur\n"
+
+-#: src/hddtemp.c:197
+-#, c-format
+-msgid ""
+-"WARNING: Drive %s doesn't appear in the database of supported drives\n"
+-"WARNING: But using a common value, it reports something.\n"
+-"WARNING: Note that the temperature shown could be wrong.\n"
+-"WARNING: See --help, --debug and --drivebase options.\n"
+-"WARNING: And don't forget you can add your drive to hddtemp.db\n"
+-msgstr ""
+-"ATTENTION : Le lecteur %s n'apparait pas dans la base de données des "
+-"lecteurs supportés\n"
+-"ATTENTION : Mais en utilisant une valeur courante, il renvoie quelque "
+-"chose.\n"
+-"ATTENTION : Notez que la température renvoyée peut être erronée.\n"
+-"ATTENTION : Voir les options --help, --debug et --drivebase.\n"
+-"ATTENTION : Et n'oubliez pas d'ajouter votre lecteur au fichier hddtemp.db\n"
+-
+-#: src/hddtemp.c:202
++#: src/hddtemp.c:211
+ #, c-format
+ msgid "%s: %s: %d%sC or %sF\n"
+ msgstr "%s: %s : %d%sC ou %sF\n"
+
+-#: src/hddtemp.c:214
++#: src/hddtemp.c:235
+ #, c-format
+ msgid "%s: %s: drive is sleeping\n"
+ msgstr "%s: %s : le lecteur est en veille\n"
+
+-#: src/hddtemp.c:217
++#: src/hddtemp.c:242
+ #, c-format
+-msgid "%s: %s: known drive, but it doesn't have a temperature sensor.\n"
++msgid "%s: %s: drive supported, but it doesn't have a temperature sensor.\n"
+ msgstr ""
+ "%s: %s: lecteur connu, mais il ne possède pas de capteur de température.\n"
+
+-#: src/hddtemp.c:220
++#: src/hddtemp.c:246
+ #, c-format
+ msgid "ERROR: %s: %s: unknown returned status\n"
+ msgstr "ERREUR : %s : %s : status inconnu\n"
+
+-#: src/hddtemp.c:235
++#: src/hddtemp.c:261
+ #, c-format
+ msgid ""
+ "\n"
+ "If one of the field value seems to match the temperature, be sure to read\n"
+-"the hddtemp man page before sending me a report (section REPORT). Thanks.\n"
++"the hddtemp man page before sending a report (section REPORT). Thanks.\n"
+ msgstr ""
+
+-#: src/hddtemp.c:308
++#: src/hddtemp.c:338
+ #, c-format
+ msgid "ERROR: invalid separator.\n"
+ msgstr "ERREUR : séparateur invalide.\n"
+
+-#: src/hddtemp.c:319
++#: src/hddtemp.c:349
+ #, c-format
+ msgid "ERROR: invalid port number.\n"
+ msgstr "ERREUR : numéro de port invalide.\n"
+
+-#: src/hddtemp.c:329
+-#, fuzzy, c-format
++#: src/hddtemp.c:371
++#, c-format
+ msgid ""
+-" Usage: hddtemp [OPTIONS] DISK1 [DISK2]...\n"
++" Usage: hddtemp [OPTIONS] [TYPE:]DISK1 [[TYPE:]DISK2]...\n"
+ "\n"
+ " hddtemp displays the temperature of drives supplied in argument.\n"
+ " Drives must support S.M.A.R.T.\n"
+ "\n"
++" TYPE could be SATA, PATA or SCSI. If omitted hddtemp will try to guess.\n"
++"\n"
+ " -b --drivebase : display database file content that allow hddtemp to\n"
+ " recognize supported drives.\n"
+ " -D --debug : display various S.M.A.R.T. fields and their values.\n"
+@@ -138,6 +107,7 @@
+ " -d --daemon : run hddtemp in TCP/IP daemon mode (port %d by "
+ "default.)\n"
+ " -f --file=FILE : specify database file to use.\n"
++" -F --foreground : don't daemonize, stay in foreground.\n"
+ " -l --listen=addr : listen on a specific interface (in TCP/IP daemon "
+ "mode).\n"
+ " -n --numeric : print only the temperature.\n"
+@@ -145,6 +115,8 @@
+ " -s --separator=C : separator to use between fields (in TCP/IP daemon "
+ "mode).\n"
+ " -S --syslog=s : log temperature to syslog every s seconds.\n"
++" -u --unit=[C|F] : force output temperature either in Celius or "
++"Fahrenheit.\n"
+ " -q --quiet : do not check if the drive is supported.\n"
+ " -v --version : display hddtemp version number.\n"
+ " -w --wake-up : wake-up the drive if need.\n"
+@@ -172,6 +144,7 @@
+ "défaut).\n"
+ " -f --file=FILE : specifie le fichier à utiliser comme base de "
+ "données.\n"
++" -F --foreground : ne pas démoniser, rester au premier plan.\n"
+ " -l --listen=addr : écoute sur une interface spécifique (en mode démon "
+ "TCP/IP).\n"
+ " -n --numeric : affiche seulement la température.\n"
+@@ -188,62 +161,95 @@
+ "\n"
+ "Report bugs or new drives to <hddtemp@guzu.net>.\n"
+
+-#: src/hddtemp.c:522
++#: src/hddtemp.c:402
+ #, c-format
+ msgid "hddtemp version %s\n"
+ msgstr "hddtemp version %s\n"
+
+-#: src/hddtemp.c:547
++#: src/hddtemp.c:418
+ #, c-format
+ msgid "ERROR: invalid interval.\n"
+ msgstr "ERREUR : intervalle invalide.\n"
+
+-#: src/hddtemp.c:547
++#: src/hddtemp.c:438
++#, c-format
+ msgid "Too few arguments: you must specify one drive, at least.\n"
+ msgstr "Trop peu d'arguments : vous devez spécifier au moins un lecteur.\n"
+
|
[-]
[+]
|
Added |
hddtemp.init
^
|
@@ -0,0 +1,176 @@
+#! /bin/sh
+#
+# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
+#
+# CoAuthor: Mr.Bool <mr.bool@rambler.ru> ;-)
+#
+# /etc/init.d/hddtemp
+#
+# and symbolic its link
+#
+# /usr/sbin/rchddtemp
+#
+### BEGIN INIT INFO
+# Provides: hddtemp
+# Required-Start:
+# Required-Stop:
+# Default-Start: 3 5
+# Default-Stop: 0 6
+# Description: Start the hddtemp daemon
+### END INIT INFO
+
+. /etc/rc.status
+. /etc/sysconfig/hddtemp
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v ditto but be verbose in local rc status
+# rc_status -v -r ditto and clear the local rc status
+# rc_failed set local and overall rc status to failed
+# rc_reset clear local rc status (overall remains)
+# rc_exit exit appropriate to overall rc status
+
+# First reset status of this service
+rc_reset
+
+HDDTEMP_EXEC=`/usr/bin/whereis $HDDTEMP_NAME | grep $HDDTEMP_NAME | awk '{print $2;}'`
+
+if ! test -f $HDDTEMP_EXEC ; then
+ echo "$HDDTEMP_EXEC not found."
+ rc_failed 1
+fi
+
+if ! test -f $HDDTEMP_DB ; then
+ echo "$HDDTEMP_DB not found."
+ rc_failed 1
+fi
+
+if test "$DEVICE" = ""; then
+# echo "device is not defined."
+ rc_failed 6
+fi
+
+if test "$HDDTEMP_PORT" = ""; then
+# echo "port is not defined."
+ rc_failed 6
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting $HDDTEMP_NAME daemon for $DEVICE"
+ ## Start daemon with startproc(8). If this fails
+ ## the echo return value is set appropriate.
+
+ startproc -f -q $HDDTEMP_EXEC $HDDTEMP_ARGS
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down $HDDTEMP_NAME daemon for $DEVICE"
+ ## Stop daemon with killproc(8) and if this fails
+ ## set echo the echo return value.
+
+ if [ -x /bin/netstat ]; then
+ netstat -nlp 2>/dev/null | while read prot a b local remote state prog; do
+ if [ "${local##*:}" = "$HDDTEMP_PORT" ] ; then
+ if [ -n "$prog" ]; then
+ kill -TERM ${prog%%/*}
+ fi
+ fi
+ done
+ else
+ echo " netstat is missing. I cannot determine if there is"
+ echo "listening $HDDTEMP_NAME configured via $HDDTEMP_CFG"
+ echo "to be stoped."
+ rc_failed 1
+ fi
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ try-restart)
+ ## Stop the service and if this succeeds (i.e. the
+ ## service was running before), start it again.
+ $0 status >/dev/null && $0 restart
+
+ # Remember status and be quiet
+ rc_status
+ ;;
+ restart)
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ $0 stop
+ $0 start
+
+ # Remember status and be quiet
+ rc_status
+ ;;
+ force-reload|reload)
+ ## Signal the daemon to reload its config. Most daemons
+ ## do this on signal 1 (SIGHUP).
+
+ echo -n "Reload service $HDDTEMP_NAME for $DEVICE"
+
+ if [ -x /bin/netstat ]; then
+ netstat -nlp 2>/dev/null | (while read prot a b local remote state prog; do
+ if [ "${local##*:}" = "$HDDTEMP_PORT" ] ; then
+ LISTENING_PRG=$prog
+ fi
+ done
+
+ if [ -n "$LISTENING_PRG" ]; then
+ kill -HUP ${LISTENING_PRG%%/*}
+ else
+ rc_failed 7
+ fi
+ )
+ else
+ echo " netstat is missing. I cannot determine if there is"
+ echo "listening $HDDTEMP_NAME configured via $HDDTEMP_CFG"
+ echo "to be reloded."
+ rc_failed 1
+ fi
+
+ rc_status -v
+
+ ;;
+ status)
+ echo -n "Checking for service $HDDTEMP_NAME:"
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+
+ if [ -x /bin/netstat ]; then
+ netstat -nlp 2>/dev/null | ( while read prot a b local remote state prog; do
+ if [ "${local##*:}" = "$HDDTEMP_PORT" ] ; then
+ LISTENING_PRG=$prog
+ fi
+ done
+
+ if [ -n "$LISTENING_PRG" ]; then
+ rc_failed 0
+ else
+ rc_failed 3
+ fi
+ )
+ else
+ echo " netstat is missing. I cannot determine if there is"
+ echo "listening $HDDTEMP_NAME configured via $HDDTEMP_CFG."
+ rc_failed 1
+ fi
+
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+rc_exit
|
[-]
[+]
|
Added |
hddtemp.sysconfig
^
|
@@ -0,0 +1,19 @@
+# program name
+HDDTEMP_NAME="hddtemp"
+
+# this file
+HDDTEMP_CFG="/etc/sysconfig/hddtemp"
+
+# hddtemp database of supported devices
+HDDTEMP_DB="/usr/share/misc/hddtemp.db"
+
+# hddtemp port
+HDDTEMP_PORT="7634"
+
+# Put at least the disk(s) you want to monitor here.
+# default is /dev/hda
+DEVICE="/dev/sda"
+
+# hddtemp command line options.
+HDDTEMP_ARGS="-d -f $HDDTEMP_DB -p $HDDTEMP_PORT $DEVICE"
+
|