UDEV questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been wrestling with udev for a while, and have several questions.

* The following rule is in a file, /etc/udev/rules.d/20-scanner.rules:

  BUS=="scsi", SYSFS{vendor}=="HP", SYSFS{model}=="C2570A", NAME="%k", SYMLINK="scanjet", MODE="0666"

  The symlink is created, but the ownership and permissions are
  incorrect:

  lrwxrwxrwx  1 root    root     3 Jan  7 03:49 /dev/scanjet -> sg1
  crw-------  1 ccurley root 21, 1 Jan  7 03:49 /dev/sg1

  Is there something wrong with the rule, or is something else munging
  the permissions after the rule operates? Perhaps after udev runs?

  Running "udevtest /sys/class/scsi_generic/sg1 scsi" suggests that the
  rule is being accepted.

    udevtest.c: looking at device '/class/scsi_generic/sg1' from subsystem 'scsi'
    udevtest.c: opened class_dev->name='sg1'
    udev_rules.c: configured rule in '/etc/udev/rules.d/20-scanner.rules[8]' applied, added symlink 'scanjet'
    udev_rules.c: add symlink 'scanjet'
    udev_rules.c: configured rule in '/etc/udev/rules.d/20-scanner.rules[8]' applied, 'sg1' becomes '%k'
    udev_add.c: creating device node '/dev/sg1', major = '21', minor = '1', mode = '0666', uid = '0', gid = '0'

* Am I using udevtest correctly? Does the "subsystem" argument mean a
  device type, such as "scsi" or "usb"?

* The following rule, in file "/etc/udev/rules.d/30-usb-disk-rules"
  does not appear to run.

  BUS=="scsi", SYSFS{vendor}=="WD", SYSFS{model}=="3200JB External", NAME="%k", SYMLINK="WD%n"

  [root@charlesc class]# udevtest /sys/block/sda scsi
  udevtest.c: looking at device '/block/sda' from subsystem 'scsi'
  udevtest.c: opened class_dev->name='sda'
  udev_rules.c: no rule found, use kernel name 'sda'
  udev_add.c: creating device node '/dev/sda', major = '8', minor = '0', mode = '0660', uid = '0', gid = '0'

  Unfortunately, udevtest does not indicate why the rule failed.

  udevinfo provides the following selected data:

    ....
    SYSFS{model}=="3200JB External"
    ....
    SYSFS{vendor}=="WD      "

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB

Attachment: pgptsYb35t3ML.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux