LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Any guess as too why this udev rule is not working? (http://www.linuxquestions.org/questions/linux-hardware-18/any-guess-as-too-why-this-udev-rule-is-not-working-668196/)

FederalPosterChild 09-07-2008 04:26 PM

Any guess as too why this udev rule is not working?
 
I am using Ubuntu hardy and set up my swap as per this How-To.

I would now like to do get rid of the bootmisc.sh step and use udev instead...
Code:

SUBSYSTEM=="block", ATTRS{serial}=="SNDKA96735037AA03903", NAME="%k", RUN+="/bin/echo 1024 > /sys/block/%k/device/max_sectors", SYMLINK+="SwpNodA", OPTIONS+="last_rule"
But the max_sector value hasn't changed... the command works fine in root terminal.

udevtest shows
Quote:

udevtest: looking at device '/block/sdb' from subsystem 'block'
udev_rules_get_name: add symlink 'SwpNodA'
udev_rules_get_name: rule applied, 'sdb' becomes 'sdb'
udev_device_event: device '/block/sdb' already in database, cleanup
name_index: removing index: '/dev/.udev/names/sdb/\x2fblock\x2fsdb'
name_index: removing index: '/dev/.udev/names/SwpNodA/\x2fblock\x2fsdb'
udev_node_add: creating device node '/dev/sdb', major=8, minor=16, mode=0660, uid=0, gid=0
udev_node_mknod: preserve file '/dev/sdb', because it has correct dev_t
name_index: creating index: '/dev/.udev/names/SwpNodA/\x2fblock\x2fsdb'
name_index: creating index: '/dev/.udev/names/sdb/\x2fblock\x2fsdb'
udev_node_update_symlinks: update symlink 'SwpNodA' of '/block/sdb'
udev_db_get_devices_by_name: found index directory '/dev/.udev/names/SwpNodA'
update_link: found 2 devices with name 'SwpNodA'
update_link: found '/block/sdb' for 'SwpNodA'
update_link: compare (our own) priority of '/block/sdb' 0 >= 0
update_link: found '/block/sdb/sdb1' for 'SwpNodA'
update_link: compare priority of '/block/sdb/sdb1' 0 > 0
update_link: 'SwpNodA' with target 'sdb' has the highest priority 0, create it
node_symlink: found existing symlink '/dev/SwpNodA'
node_symlink: preserve already existing symlink '/dev/SwpNodA' to 'sdb'
udevtest: run: '/bin/echo 1024 > /sys/block/sdb/device/max_sectors'
Any thoughts?


All times are GMT -5. The time now is 12:19 PM.