Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390275 - patch for app-admin/hddtemp conf.d long options
Summary: patch for app-admin/hddtemp conf.d long options
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-12 16:12 UTC by Roger
Modified: 2012-03-16 14:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger 2011-11-12 16:12:59 UTC
The app-admin/hddtemp conf.d should use long options.

Here's a quick patch.

Also note, I added the "--quiet" option, else hddtemp complains it doesn't recognize your hard drive but goes ahead and tries reading it anyways.  Without the --quiet option, conky & user script sometimes fail from the additional stdout.  I believe this is quiet safe as hddtemp is just reading and not writing.  I also don't think the hddtemp developers are aggressively adding every hard drive a manufacture makes these days.  Hence, probably a good idea to add the --quiet tag.  If you're still hesitant and want to see conky break on newer hard drives, at least add a comment, "If hddtemp complains but finds your hdd temp sensor, use the --quiet flag to hush the warning else this breaks Conky."

(Also note, the conf.d will spawn a separate background hddtemp process, hence users will never see the additional output anyways.)

--- hddtemp.20111112    2011-11-12 06:58:38.000000000 -0900
+++ hddtemp     2011-11-12 06:59:11.210734052 -0900
@@ -7,7 +7,7 @@
 
 # Various options to pass to the daemon
 # (default host:port is 127.0.0.1:7634)
-HDDTEMP_OPTS="-l 127.0.0.1 -q"
+HDDTEMP_OPTS="--listen=127.0.0.1 --quiet"
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-11-14 12:30:36 UTC
(In reply to comment #0)
> The app-admin/hddtemp conf.d should use long options.

Why?


> Also note, I added the "--quiet" option, else hddtemp complains it doesn't
> recognize your hard drive but goes ahead and tries reading it anyways.
> Without the --quiet option, conky & user script sometimes fail from the
> additional stdout.  I believe this is quiet safe as hddtemp is just reading
> and not writing.  I also don't think the hddtemp developers are aggressively
> adding every hard drive a manufacture makes these days.

I'm adding every hard drive identification I get reported.  I'm hesitant to
hide problems, but…


> If you're still hesitant and want to see conky break on newer hard drives,
> at least add a comment, "If hddtemp complains but finds your hdd temp
> sensor, use the --quiet flag to hush the warning else this breaks Conky."

…comment is OK.  Thanks!
Comment 2 Roger 2011-11-14 15:25:21 UTC
>> The app-admin/hddtemp conf.d should use long options.

> Why?

When scripting, one should always use long options if they're available as they make reading the script/code easier.

Maybe, the long option wasn't available when the hddtemp conf.d file was written.  Also, very likely the quiet option wasn't available as well.

Of course, this is only a suggestion as I don't want to be responsible for breaking somebody's box. ;-)


(Personally, the only reason I can find to use the short options are when typing the command manually on the terminal/console as it saves keystrokes and only I need to see the incantation.)
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-02-28 22:15:26 UTC
(In reply to comment #2)
> >> The app-admin/hddtemp conf.d should use long options.
> 
> > Why?
> 
> When scripting, one should always use long options if they're available as
> they make reading the script/code easier.
> 
> Maybe, the long option wasn't available when the hddtemp conf.d file was
> written.  Also, very likely the quiet option wasn't available as well.
> 
> Of course, this is only a suggestion as I don't want to be responsible for
> breaking somebody's box. ;-)
> 
> 
> (Personally, the only reason I can find to use the short options are when
> typing the command manually on the terminal/console as it saves keystrokes
> and only I need to see the incantation.)

hddtemp -l <address> option is so straightforward that personally I don't see any reason to change it.

Thanks for hint to add hint about --quiet option. This is done.
Comment 4 Roger 2012-02-28 22:41:03 UTC
shrugs :-/
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-16 14:24:34 UTC
Fixed along with some other config change, btw.