This file is indexed.

/usr/share/doc/hddtemp/contribs/hddtemp-all.sh is in hddtemp 0.3-beta15-52+b1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
#
# Small script that provides the temperature of all local hard disks
# 
# This program is copyright 2004 by Javier Fernandez-Sanguino <jfs@debian.org>
#
#    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 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# For more information please see
#  http://www.gnu.org/licenses/licenses.html#GPL

#set -e

PATH=/sbin:/usr/sbin:/bin:/usr/bin

if [ ! -x "`which hddtemp`" ] ; then
	echo "ERROR: Hddtemp is not available"
	exit 1
fi


# NOTE, you could actually change this to 
# ls /dev/hd? /dev/sd?
# but then you would need to remove the cruft of non-existant drives...
df -l |cut -f 1 -d " " |grep /dev/ |sed -e 's/[[:digit:]]$//g' |sort -u |
while read drive; do
	# TODO: 
	case "$drive" in
	    /dev/sd*|/dev/hd*)
	    # NOTE: Scsi devices might be error-prone, since many non-HDD
	    # devices uses SCSI or SCSI emulation (CD-ROMs, USB mass storage..)
		hddtemp $drive
		;;
	    /dev/md*)
	    # TODO: it could actually look somewher for the information
	    # of the disks that make up the raid, maybe looking it up
	    # at /proc/mdstat
	    	echo "RAID devices currently not supported ($drive)"
		;;
	    /dev/vg*)
	    	echo "LVM devices currently not supported ($drive)"
		;;
	    /dev/cdrom*|/dev/fd*)
	    # Some common non-HD elements which might be mounted,
	    # we skip these
	    	;;
	    *)
	    	echo "Unknown drive currently not supported ($drive)"
		;;
	esac
done

exit 0