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

Bug 27282

Summary: hdparm throws warning although $all_args is not set in /etc/conf.d/hdparm
Product: Gentoo Linux Reporter: Florian Wilhelm <Florian.Wilhelm>
Component: [OLD] Core systemAssignee: Heinrich Wendel (RETIRED) <lanius>
Status: RESOLVED FIXED    
Severity: normal CC: azarah, mr_bones_
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Florian Wilhelm 2003-08-25 03:19:54 UTC
If some cdrom drives run with ide-scsi and some not, it is logical not to use
all_args in /etc/conf.d/hdparm, because hdparm cannot set options on scsi
emulated drives. 
Although not having set all_args, if some drives run with ide-scsi following
warning appears:
Skipping $i hdparm does not support SCSI devices.

The problem is in the following lines in /etc/init.d/hdparm:
elif [ ! -n "${all_args}" ]    # remove ! before -n
then
     ewarn "Skipping $i hdparm does not support SCSI devices."
fi

-n returns true if all_args is NOT empty and ! inverses true to false.
So if ! is removed, the script does what it should do.

Reproducible: Always
Steps to Reproduce:
1. set up some cdrom devices to run with ide-scsi
2. do not set all_args in /etc/conf.d/hdparm
3.

Actual Results:  
Warning "Skipping cdrom1 hdparm does not support SCSI devices." appears,
although it should not.
               


Expected Results:  
No Warning should appear.
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2003-08-26 11:06:06 UTC
as far as i see you are right -> fixed :) (no version bump)