Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27282 - hdparm throws warning although $all_args is not set in /etc/conf.d/hdparm
Summary: hdparm throws warning although $all_args is not set in /etc/conf.d/hdparm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-25 03:19 UTC by Florian Wilhelm
Modified: 2003-08-26 11:06 UTC (History)
2 users (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 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)