Summary: | sys-apps/hdparm-9.50 initscript media detection doesn't work | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Yarda <zbox> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Proposed fix |
Description
Yarda
2017-02-11 16:30:57 UTC
I'm sorry it took so long for someone to look at this bug report. Are you sure your propsed fix is correct? Looking at line 39 of the init script, the variable "nomed" already gets initialized with value "1". So with your proposed change "nomed" could never have a value of "0", not even any other value than "1". After checking the hdparm-init-8 script, it seems the condition on line 45 [1] intentionally checks the error code (status) and if there is some error it checks whether it's the no media error. It's probably there to allow running hdparm on devices without media. A bit confusing is that it uses value '0' in the 'nomedia' variable to signal no media. I guess the source of my problem are the wrong args in the 'all_args' which are not applicable to the drive without media. Maybe the hdparm-init-8 script could be extended to distinguish arguments for removable and non removable devices. Nevertheless, the initial bug report was wrong, sorry for the noise. [1] https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/hdparm/files/hdparm-init-8 |