[conspire] Fc5/udev

John Andrews jla1200 at netzero.net
Wed Oct 18 17:45:48 PDT 2006


[root at localhost jla]# cd /dev
[root at localhost dev]# ln -s ttyS0 modem
[root at localhost dev]# ls -l

I'm trying to write a udev rule so that I don't have to make the symlink like 
this every time.I read a udev how to and it says to make a rule based on the 
udevinfo. Like this.

jla at localhost ~]$ udevinfo -a -p /sys/class/tty/ttyS0/dev

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

  looking at device '/class/tty/ttyS0/dev': 
    KERNEL=="dev"					 I USED THIS DEVICE SECTION TO WRITE MY RULE.
    SUBSYSTEM=="tty"				WHICH i PUT IN /etc/udev/rules.d/10-local.rules

  looking at device '/class/tty/ttyS0':
    ID=="ttyS0"
    BUS=="tty"
    DRIVER==""
    SYSFS{dev}=="4:64"

  looking at device '/devices/pnp0/00:0a':
    ID=="00:0a"
    BUS=="pnp"
    DRIVER=="serial"
    SYSFS{id}=="PNP0501

"I made this rule but it doesn't work or have any effect.
[jla at localhost rules.d]$ cat 10-local.rules

KERNEL=="dev",  SUBSYSTEM=="tty", SYMLINK+="modem"


I TRIED THIS UDEVTEST COMMAND

  [jla at localhost ~]$ udevtest /class/tty/ttyS0:
main: looking at device '/class/tty/ttyS0' from subsystem 'tty'
udev_rules_get_name: rule applied, 'ttyS0' becomes 'ttyS0'
create_node: creating device node '/dev/ttyS0', major = '4', minor = '64', 
mode = '0660', uid = '0', gid = '14'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/ttyS0 '
[jla at localhost ~]$


I'M NOT SURE WHAT IT MEANS-NO MODEM SYMLINK WAS CREATED.






More information about the conspire mailing list