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
which version of hdparm ?
# hdparm -V hdparm v5.3
and emerge -s hdparm ?
$ 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
Created attachment 11838 [details, diff] try this patch try this patch
try this patch
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 ;-)
download the patchfile to /usr/portage/sys-apps/hdparm/files patch -p0 < patchfile
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.
Created attachment 11841 [details] new version
try the new one please
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 ]
This has been fixed in hdparm 5.4
actually i fixed that randomly once a blue moon ago cause it annoyed me didnt realize there was a bug about it :)