void-packages/templates/udev/files/81-xbps.rules

126 lines
4.1 KiB
Plaintext
Raw Normal View History

# Additional rules for xbps. Bassed off 81-arch.rules from
# Archlinux.
# permission for sg devices
KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0660"
# permissions for IDE CD devices
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", GROUP="optical"
# permissions for SCSI CD devices
SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", SYMLINK+="scd%n", GROUP="optical"
SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", GROUP="optical"
# permissions for removable devices like cardreaders or sticks
KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="0", GROUP="storage"
# permissions for firewire external drives
KERNEL=="sd*", ATTRS{scsi_level}=="5", GROUP="storage"
# permissions for usb to scsi external adapters
KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="7", GROUP="storage"
# permissions for ide storage like pcmcia card readers
ACTION!="add", GOTO="pcmcia_end"
SUBSYSTEM!="block", GOTO="pcmcia_end"
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*", IMPORT{parent}=="ID_*"
KERNEL=="hd*", ENV{ID_TYPE}=="generic", GROUP="storage"
LABEL="pcmcia_end"
# permissions for SCSI scanners
SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="6", GROUP="scanner"
# consoles
KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK+="%k"
KERNEL=="vcs", NAME="vcc/0"
KERNEL=="vcs[0-9]*", NAME="vcc/%n"
KERNEL=="vcsa", NAME="vcc/a0"
KERNEL=="vcsa[0-9]*" NAME="vcc/a%n"
# serial
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="ttyS%n"
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK+="%k"
# md block devices
KERNEL=="md[0-9]*", NAME="md%n", SYMLINK+="md/%n"
# mem
KERNEL=="ram0", SYMLINK+="ramdisk"
KERNEL=="ram1", SYMLINK+="ram"
KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k"
# video4linux
KERNEL=="vbi0", SYMLINK+="vbi"
KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK+="%k"
KERNEL=="radio0", SYMLINK+="radio"
KERNEL=="radio[0-9]*", NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video"
KERNEL=="video0", SYMLINK+="video"
KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK+="%k"
KERNEL=="vtx0", SYMLINK+="vtx"
KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", SYMLINK+="%k"
# video devices
### xorg resets those permissions, adjust your xorg.conf!
KERNEL=="3dfx*", GROUP="video"
KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k"
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video"
# i2c devices
KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK+="%k"
# loop devices
KERNEL=="loop[0-9]*", NAME="loop/%n", SYMLINK+="%k"
# misc
KERNEL=="nvram", NAME="misc/%k", SYMLINK+="%k"
KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k"
KERNEL=="uinput", SYMLINK+="%k"
KERNEL=="sgi_fetchop", MODE="0666"
KERNEL=="sonypi", MODE="0666"
KERNEL=="inotify", NAME="misc/%k", SYMLINK+="%k", MODE="0666"
# sound devices
# oss devices
KERNEL=="audio*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="dmmidi*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="admmidi*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="dsp*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="adsp*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="amidi*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="mixer*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="sequencer*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="aload*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="amixer*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="music", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="dmfm*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="midi[0-9]*", NAME="sound/%k", SYMLINK+="%k"
# USB devices
KERNEL=="legousbtower*", MODE="0666"
# netlink devices
KERNEL=="route", NAME="netlink/%k"
KERNEL=="skip", NAME="netlink/%k"
KERNEL=="usersock", NAME="netlink/%k"
KERNEL=="fwmonitor", NAME="netlink/%k"
KERNEL=="tcpdiag", NAME="netlink/%k"
KERNEL=="nflog", NAME="netlink/%k"
KERNEL=="xfrm", NAME="netlink/%k"
KERNEL=="arpd", NAME="netlink/%k"
KERNEL=="route6", NAME="netlink/%k"
KERNEL=="ip6_fw", NAME="netlink/%k"
KERNEL=="dnrtmsg", NAME="netlink/%k"
### ! disabled seems to break device creation !
# KERNEL=="tap*", NAME="netlink/%k"
# IEEE1394 (firewire) devices
KERNEL=="raw1394", NAME="%k", GROUP="video"
# kbd devices
KERNEL=="kbd", MODE="0664"
# CPU
KERNEL=="cpu[0-9]*", SYMLINK="%k"
KERNEL=="msr[0-9]*", SYMLINK="%k"