how can i deactivate a udev rule?
Robert P. J. Day
rpjday at crashcourse.ca
Sat Apr 23 11:34:49 UTC 2011
this might more properly be a kernel question but for now, it's
userspace related. how can i deactivate a udev rule so that the
appropriate device file is *not* created at module load time? i tried
commenting out the rule in the rules file, then i ran:
$ sudo udevadm control --reload-rules
even though the udevadm man page suggests that's not necessary but
that didn't do it.
specifically (and just as an exercise), i want to disable the
creation of /dev/kvm when my kvm-intel module is loaded, just as a
demonstration for how udev works.
right this second, i have no kvm-related modules loaded and there is
no /dev/kvm file. if i:
$ sudo modprobe kvm-intel [on my intel core i3 system]
not only are the kvm and kvm-intel modules loaded, but i predictably
get the device file:
crw-rw----+ 1 root kvm 10, 232 2011-04-23 07:30 /dev/kvm
which i assume is due to the contents of the file
/lib/udev/rules.d/45-qemu-kvm.rules:
KERNEL=="kvm", GROUP="kvm", MODE="0660"
and if i unload those modules, the /dev/kvm file vanishes -- all
proper and appropriate behaviour.
but if i comment out that line in that udev file and load my kvm
modules, i still get that /dev/kvm file. what am i overlooking?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the ubuntu-users
mailing list