Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 144171

Summary: init script runs hdparm on all devices, even with unset/empty args
Product: Gentoo Linux Reporter: x00000000
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hdparm/files/hdparm-init-7?rev=1.7&view=markup
Whiteboard:
Package list:
Runtime testing required: ---

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 ***