/lib/udev/hdparm Compares Against $DEVNAME.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hdparm (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: hdparm
Ubuntu 7.10, hdparm 7.5-1ubuntu1. My /etc/hdparm.conf has entries like
/dev/
}
which work just fine with /etc/init.d/hdparm. However, it appears init.d/hdparm is on its way out and has been replaced with /lib/udev/hdparm. That only executes hdparm(8) for bits of /etc/hdparm.conf that match $DEVNAME, presumably passed in by udev. I guess it'll have values like /dev/sda or /dev/hda. However, I don't necessarily know what the /dev name will be, so I've specified it by /dev/disk/by-id instead which is a symlink.
$ stat -c %N /dev/disk/
`/dev/
It seems that /lib/udev/hdparm needs to do some readlink(1) or similar for each of the discs specified in /etc/hdparm.conf, e.g. `readlink -e /dev/disk/
Sounds quite useful.
Would you test if the attached /lib/udev/hdparm does what you want?
diff /lib/udev/hdparm /tmp/hdparm
93c93,98
< DISC=$KEY
---
> if [ -L $KEY ]
> then
> DISC=$(readlink -m $KEY)
> else
> DISC=$KEY