parsing of 'command_line' section of hdparm.conf should evaluate variables
Bug #507830 reported by
Jerome Haltom
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hdparm (Ubuntu) |
New
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: hdparm
/etc/hdparm is parsed by /lib/udev/hdparm. This simple script looks for a specific section: command_line, and runs each line in turn. It's quite hacky. The comments even say so. That's fine.
The command lines run in command_line should have environment variables evaluated. They don't. This would make it easy to access $DEVNAME to figure out what device is being altered, in case a custom hdparm command was being made for it.
The fix is simple:
$KEY $SEP $VALUE
to
eval $KEY $SEP $VALUE
This just results in the string stored in $KEY being evaluated, and variables in it being expanded. Seems to work okay for me.
To post a comment you must log in.