FS#32368 - [hddtemp] not returning HDD temps for multiple drives as a systemd service

Attached to Project: Arch Linux
Opened by Peter Hardman (shetland_breeder) - Thursday, 01 November 2012, 17:53 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 04 November 2012, 05:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ionut Biru (wonder)
Gaetan Bisson (vesath)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

hddtemp returns an error in response to 'telnet localhost 7634' if the DRIVES= variable in /etc/conf.d/hddtemp is of the form "/dev/sd[ab]" when run as a systemd service.

Works as expected if drives are specified as "/dev/sda /dev/sdb"

The man page gives the /dev/sd[ab] form in an example and it always worked with initscripts.

Additional info:
hddtemp 0.3.beta15.52-1
systemd 195-2
kernel 3.6.4=1


Steps to reproduce:

Run hddtemp as a systemd service reporting on multiple hard drives.

The same command line used by the service works as expected from the console.

In the failing case the telnet output is:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
|/dev/sd[ab]|???|ERR|*|Connection closed by foreign host.

vs the expected:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
|/dev/sda|Hitachi HDT721032SLA360|27|C||/dev/sdb|Hitachi HDT721032SLA360|27|C|Connection closed by foreign host.

I've reported this here instead of upstream because it seems to related to running hddtemp as a systemd service.

This task depends upon

Closed by  Gaetan Bisson (vesath)
Sunday, 04 November 2012, 05:14 GMT
Reason for closing:  Upstream
Comment by Peter Hardman (shetland_breeder) - Saturday, 03 November 2012, 16:39 GMT
I was out for a walk today and suddenly realised why this happens. Both the command-line and the initscripts invocation of hddtemp get the device names expanded by the shell. Evidently systemd does not incorporate filename expansion in the same way that the shell does.

So I guess this is an upstream bug.
Comment by Gaetan Bisson (vesath) - Sunday, 04 November 2012, 05:14 GMT
It would be great if you could submit a bug upstream.

Loading...