Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144171 - init script runs hdparm on all devices, even with unset/empty args
Summary: init script runs hdparm on all devices, even with unset/empty args
Status: RESOLVED DUPLICATE of bug 142777
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL: http://sources.gentoo.org/viewcvs.py/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-16 18:34 UTC by x00000000
Modified: 2006-08-16 18:56 UTC (History)
0 users

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 x00000000 2006-08-16 18:34:41 UTC
Problem is in do_hdparm() in /etc/init.d/hdparm:

	if [[ -n ${args:=${all_args} ${!extra_args}} ]] ; then

is always true because of the space.

Simplest fix is to replace it with

	if [[ " " != ${args:=${all_args} ${!extra_args}} ]] ; then
Comment 1 x00000000 2006-08-16 18:56:29 UTC
Sorry for the spam. Should have searched better first.


*** This bug has been marked as a duplicate of 142777 ***