Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20816 - hdparm's startup script doesn't check to see if a cdrom exists
Summary: hdparm's startup script doesn't check to see if a cdrom exists
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High trivial
Assignee: Jay Pfeifer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-11 17:45 UTC by gentoo@danielquinn.org
Modified: 2003-11-25 07:11 UTC (History)
0 users

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


Attachments
try this patch (patch,615 bytes, patch)
2003-05-12 15:17 UTC, Martin Holzer (RETIRED)
Details | Diff
new version (patch,452 bytes, text/plain)
2003-05-12 16:05 UTC, Martin Holzer (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo@danielquinn.org 2003-05-11 17:45:41 UTC
if you install sys-apps/hdparm to run hdparm on your hard dirve(s) at startup, but 
don't have a cdrom installed, the script still runs and works just fine, but the 
following error is printed to the screen at startup: 
 
  dir: /dev/cdroms No such file or directory 
 
it's not a big deal, since the script still runs, but it could be easily fixed with a 
test for the existence of /dev/cdroms before attempting to run hdparm on all 
devices in that directory. 

Reproducible: Always
Steps to Reproduce:
1. install gentoo 
2. remove (or don't even install a cdrom) 
3. install hdparm 
4. /etc/init.d/hdparm start 
Actual Results:  
the following error message was printed to stdout: 
 
  dir: /dev/cdroms No such file or directory 

Expected Results:  
checked if /dev/cdroms/ existed first
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 12:16:55 UTC
which version of hdparm ?
Comment 2 gentoo@danielquinn.org 2003-05-12 12:31:45 UTC
# hdparm -V 
hdparm v5.3 
 
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 13:10:05 UTC
and 
emerge -s hdparm ?
Comment 4 gentoo@danielquinn.org 2003-05-12 15:02:44 UTC
$ emerge --search hdparm 
Searching... 
[ Results for search key : hdparm ] 
[ Applications found : 1 ] 
 
*  sys-apps/hdparm 
      Latest version available: 5.3-r2 
      Latest version installed: 5.3-r2 
 
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 15:17:34 UTC
Created attachment 11838 [details, diff]
try this patch

try this patch
Comment 6 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 15:20:02 UTC
try this patch
Comment 7 gentoo@danielquinn.org 2003-05-12 15:28:59 UTC
sorry, but i have no idea how to "try" a patch.  i opened the link and just got a bunch of letters 
and numbers...  just because i reported the bug and can cat a startup script doesn't mean i 
know what i'm doing ;-) 
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 15:47:04 UTC
download the patchfile to /usr/portage/sys-apps/hdparm/files
patch -p0 < patchfile
Comment 9 gentoo@danielquinn.org 2003-05-12 15:51:33 UTC
umm, it didn't work: 
 
 
(/usr/portage/sys-apps/hdparm/files) # wget 
"http://bugs.gentoo.org/attachment.cgi?id=11838&action=view" 
--16:10:21--  http://bugs.gentoo.org/attachment.cgi?id=11838&action=view 
           => `attachment.cgi?id=11838&action=view' 
Resolving bugs.gentoo.org... done. 
Connecting to bugs.gentoo.org[66.250.107.251]:80... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 615 [text/plain] 
 
100%[=========================================================================================================================>] 
615          600.59K/s    ETA 00:00 
 
16:10:21 (600.59 KB/s) - `attachment.cgi?id=11838&action=view' saved [615/615] 
 
 
[root@alexandria][2003-05-12 16:10:22][1.05|1.03|1.00][/=41%] 
(/usr/portage/sys-apps/hdparm/files) # patch -p0 < attachment.cgi\?id\=11838\&action\=view 
patch: **** Only garbage was found in the patch input. 
 
Comment 10 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 16:05:03 UTC
Created attachment 11841 [details]
new version
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 16:05:25 UTC
try the new one please
Comment 12 gentoo@danielquinn.org 2003-05-12 16:21:42 UTC
i ran the patch, re-emerged hdparm and tried to restart hdparm: 
 
# /etc/init.d/hdparm restart 
 * ERROR:  "/etc/init.d/hdparm" has syntax errors in it; not executing... 
 
so i did the following: 
 
# rm -r /usr/portage/sys-apps/hdparm/files/* 
# emerge sync 
# emerge hdparm 
# etc-update 
    -5 
# /etc/init.d/hdparm restart 
 * Stopping hdparm...                                            [ ok ] 
 * Starting hdparm... 
dir: /dev/cdroms: No such file or directory 
 * Running hdparm on disc0...                                    [ ok ] 
 * Running hdparm on disc1...                                    [ ok ] 
 * Running hdparm on disc2...                                    [ ok ] 
Comment 13 Andrew Cooks (RETIRED) gentoo-dev 2003-11-25 06:24:51 UTC
This has been fixed in hdparm 5.4
Comment 14 SpanKY gentoo-dev 2003-11-25 07:11:44 UTC
actually i fixed that randomly once a blue moon ago cause it annoyed me

didnt realize there was a bug about it :)