next up previous contents Next: Mécanisme d'udev. Up: udev Previous: Installation d'udev.   Table des matières  

19.8.3 Fichiers principaux.

Au minimum, le répertoire /etc/udev contient:

Enfin, /etc/dev.d peut contenir les répertoires defaut et net pour l'exécution d'udev. Par exemple, net est un programme invoqué par udev pour assurer que tout périphérique réseau q'udev renomme, maintient en activité le script hotplug avec le nom courant.

Les informations contenues dans udev.permissions devraient ressembler à ceci:

# /etc/udev/udev.permissions: permission/ownership map for udev  
# $Header: /home/cvsroot/gentoo-x86/sys-fs/udev/files/udev.permissions,v 1.3 2004/01/01 03:41:24 azarah Exp $

# console devices console:root:tty:0600 tty:root:tty:0666 tty[0-9]*:root:tty:0660 vc/[0-9]*:root:tty:0660

# pty devices # Set this to 0660 if you only want users belonging to tty group # to be able to allocate PTYs ptmx:root:tty:0666 pty[p-za-e][0-9a-f]*:root:tty:0660 tty[p-za-e][0-9a-f]*:root:tty:0660  
pty/m*:root:tty:0660 vc/s*:root:tty:0660 
... 
... 
# mainboard devices apm_bios:root:root:0600

# scsi devices sg*:root:disk:0660 pg*:root:disk:0660 cdwriter:root:disk:0660

# usb devices usb/dabusb*:root:usb:0660 usb/mdc800*:root:usb:0660 usb/rio500:root:usb:0660 usb/legousbtower*:root:usb:0660

sgi_fetchop:root:root:666  
iseries/vcd*:root:disk:660  
iseries/vd*:root:disk:660 



Par défaut, les droits sont fixés à 0660.

Voici un échantillon du ficher udev.rules (voir la sous-section 19.8.6):

# /etc/udev/udev.rules: device naming rules for udev  
#  
# Gentoo specific rules, based a bit on devfs rules, but much simpler.  
#  
# There are a number of modifiers that are allowed to be used in some of the  
# fields. See the udev man page for a full description of them. 

######################################  
#  
# For devfs similar /dev layout (neater)  
#

########################################################### 
 
# cdrom symlinks and other good cdrom naming  
BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"  
BUS="scsi", KERNEL="sr[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"  
BUS="scsi", KERNEL="scd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}" 
 
# devfs-names for ide-devices (uncomment only one)  
# /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}" 
 
# dri devices KERNEL="card*", NAME="dri/card%n" 
 
# alsa devices 
 
KERNEL="controlC[0-9]*", NAME="snd/%k"  
KERNEL="hw[CD0-9]*", NAME="snd/%k"  
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"  
KERNEL="midiC[D0-9]*", NAME="snd/%k"  
KERNEL="timer", NAME="snd/%k"  
KERNEL="seq", NAME="snd/%k"  
 
... 
... 
# vc devices  
KERNEL="vcs", NAME="vcc/0", SYMLINK="%k"  
KERNEL="vcs[0-9]*", NAME="vcc/%n", SYMLINK="%k"  
KERNEL="vcsa", NAME="vcc/a0", SYMLINK="%k"  
KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k" 
 
# v4l devices  
KERNEL="video[0-9]*", NAME="v4l/video%n", SYMLINK="video%n" KERNEL="radio[0-9]*", NAME="v4l/radio%n"  
KERNEL="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK="vbi%n" KERNEL="vtx[0-9]*", NAME="v4l/vtx%n" 


next up previous contents Next: Mécanisme d'udev. Up: udev Previous: Installation d'udev.   Table des matières  
1-01-2006