udev.rules behavior changed ?
a while back i asked a question about how to disable device nodes from being created ... a good example is the tty stuff. by default, 64 tty's are created (0-63) and the only solution is to either edit the kernel (not useful across many different machines and kernel upgrades) or to 'trick' the udev.rules file as so (this is what was suggested and what *used* to work):
KERNEL="tty[0-9]", NAME="vc/%n", SYMLINK="%k"
KERNEL="tty[0-9]*", NAME=""
here you can see that tty0 - tty9 would have the nodes created while tty10-tty63 should disappear ... however, now with udev-026 at least (it's the first time i noticed because i was debugging that tty/666/660 mode bug), i get all the vc nodes in /dev/vc/ with their tty symlinks in /dev/
is there a 'better' way to do what i want or is this a 'bug' ? :) -mike
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Mike Frysinger
a while back i asked a question about how to disable device nodes from being created ... a good example is the tty stuff. by default, 64 tty's are created (0-63) and the only solution is to either edit the kernel (not useful across many different machines and kernel upgrades) or to 'trick' the udev.rules file as so (this is what was suggested and what *used* to work):
KERNEL="tty[0-9]", NAME="vc/%n", SYMLINK="%k"
KERNEL="tty[0-9]*", NAME=""
Quoted 7 lines
here you can see that tty0 - tty9 would have the nodes created while tty10-tty63 should disappear ... however, now with udev-026 at least (it's the first time i noticed because i was debugging that tty/666/660 mode bug), i get all the vc nodes in
/dev/vc/with their tty symlinks in/dev/is there a 'better' way to do what i want or is this a 'bug' ? :) -mike
Your rules are working as expected on my box:
[root@pim kay]# ls -la /udev/tty*
crw------- 1 root root 5, 0 Jun 12 14:09 /udev/tty lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty0 -> vc/0 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty1 -> vc/1 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty2 -> vc/2 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty3 -> vc/3 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty4 -> vc/4 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty5 -> vc/5 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty6 -> vc/6 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty7 -> vc/7 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty8 -> vc/8 lrwxrwxrwx 1 root root 4 Jun 12 14:09 /udev/tty9 -> vc/9 crw------- 1 root root 4, 64 Jun 12 14:09 /udev/ttyS0 crw------- 1 root root 4, 65 Jun 12 14:09 /udev/ttyS1 crw------- 1 root root 4, 66 Jun 12 14:09 /udev/ttyS2 crw------- 1 root root 4, 67 Jun 12 14:09 /udev/ttyS3 crw------- 1 root root 4, 68 Jun 12 14:09 /udev/ttyS4 crw------- 1 root root 4, 69 Jun 12 14:09 /udev/ttyS5 crw------- 1 root root 4, 70 Jun 12 14:09 /udev/ttyS6 crw------- 1 root root 4, 71 Jun 12 14:09 /udev/ttyS7
Are you sure your rules file matches the configured one in udev.conf? By default, udev reads all files in /etc/udev/rules.d/ ending with "*.rules".
Please try udevtest:
[root@pim kay]# /usr/bin/udevtest /sys/class/tty/tty9
version 026
looking at '/class/tty/tty9'
configured rule in '/etc/udev/rules.d/10-local.rules' at line 1 applied, added symlink '%k' configured rule in '/etc/udev/rules.d/10-local.rules' at line 1 applied, 'tty9' becomes 'vc/%n' creating device node '/udev/vc/9', major = '4', minor = '9', mode = '020600', uid = '0', gid = '0'
[root@pim kay]# /usr/bin/udevtest /sys/class/tty/tty10
version 026
looking at '/class/tty/tty10'
configured rule in '/etc/udev/rules.d/10-local.rules' at line 2 applied, 'tty10' is ignored
If this doesn't help, please build udev with "make DEBUG=true" and look at the syslog, how your rules are processed.
Good luck,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Kay Sievers
Are you sure your rules file matches the configured one in udev.conf? By default, udev reads all files in
/etc/udev/rules.d/ending with "*.rules".
ah i guess there's the trouble ;)
i've been using /etc/udev/udev.rules instead of the new /etc/udev/rules.d/ sorry about that
-mike
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel