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

Re: udev et cdsymlink



NaiosKAE{FR} a écrit :
commence par :

user@machine:~$ udevinfo -a -p `udevinfo -q path -n /dev/hdd`

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.

device '/sys/block/hdd' has major:minor 22:64
  looking at class device '/sys/block/hdd':
    SUBSYSTEM="block"
    SYSFS{dev}="22:64"
    SYSFS{range}="1"
    SYSFS{removable}="1"
    SYSFS{size}="8388604"
SYSFS{stat}=" 7254 277998 1141008 1592521 0 0 0 0 0 851413 1592521"

follow the class device's "device"
couldn't open device directory


ensuite trouves la chaine qui identifie de façon unique ton périphérique

soit tu modifies dans /etc/udev/rules.d/cd-aliases.rules mais j'ai peur des conséquences

# These rules create the /dev/{cdrom,dvd,...} symlinks. Also see the
# /etc/udev/cdsymlinks.conf config file.
#
# If you would like to statically configure the aliases instead, you can
# use rules like:
# BUS="ide", ID="1.0", SYMLINK="cdrom"

BUS="scsi", KERNEL="sr[0-9]*", \
  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", \
  SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
BUS="ide",  KERNEL="hd[a-z]",   SYSFS{removable}="1", \
  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", \
  SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
BUS="ide",  KERNEL="pcd[0-9]*", SYSFS{removable}="1", \
  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", \
  SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"


soit tu te créées une règle spécifique dans /etc/udev/rules.d/local.rules avec la syntaxe suivante:

BUS="ide",  KERNEL="hd[a-z]", SYSFS{dev}="22:64" , NAME="%k", \
  SYMLINK="KEY"


petite correction dans le cas de cdrom :
BUS="ide",  KERNEL="hd[a-z]", SYSFS{dev}="22:64" , NAME="%k", \
  SYMLINK="cdrom"

et dans /etc/udev/cdsymlinks.conf
passes la variable NUMBERED_LINKS à 1 (enleve le commentaire) (autrement /dev/cdrom sera dejà utilisé ;))
--
Erwann PENCREACH

BF>la question qui fâche, c'est le montage vidéo sous Linusque.
man mount.
-+- VB in GFA: Sexe, montage et vidéo. -+-



Reply to: