systemd/udev-openmamba.rules

70 lines
3.7 KiB
Plaintext
Raw Normal View History

2023-12-30 11:35:14 +01:00
#
# openmamba custom rules for udev
# Copyright (c) 2008 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# if this is a ide cdrom, name it the default name, and create a symlink to cdrom
SUBSYSTEM=="block", KERNEL=="*[!0-9]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom", SYMLINK+="cdrom cdrom-%k"
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k", GROUP="cdrom"
# if this is a ide dvd, create a symlink to dvd
SUBSYSTEM=="block", KERNEL=="hd[a-z]", ATTR{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k"
# if this is a ide dvd, create a symlink to dvd
ATTR{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k"
# Sound devices
KERNEL=="admmidi", SYMLINK+="sound/admmidi", GROUP="audio"
KERNEL=="admmidi[1-9]", SYMLINK+="sound/admmidi%n", GROUP="audio"
KERNEL=="adsp", SYMLINK+="sound/adsp", GROUP="audio"
KERNEL=="adsp[1-9]", SYMLINK+="sound/adsp%n", GROUP="audio"
KERNEL=="amidi", SYMLINK+="sound/amidi", GROUP="audio"
KERNEL=="amidi[1-9]", SYMLINK+="sound/amidi%n", GROUP="audio"
KERNEL=="amixer", SYMLINK+="sound/amixer", GROUP="audio"
KERNEL=="amixer[1-9]", SYMLINK+="sound/amixer%n", GROUP="audio"
KERNEL=="audio", SYMLINK+="sound/audio", GROUP="audio"
KERNEL=="audio[1-9]", SYMLINK+="sound/audio%n", GROUP="audio"
KERNEL=="dmmidi", SYMLINK+="sound/dmmidi", GROUP="audio"
KERNEL=="dmmidi[1-9]", SYMLINK+="sound/dmmidi%n", GROUP="audio"
KERNEL=="dsp", SYMLINK+="sound/dsp", GROUP="audio"
KERNEL=="dsp[1-9]", SYMLINK+="sound/dsp%n", GROUP="audio"
KERNEL=="dmfm", SYMLINK+="sound/dmfm", GROUP="audio"
KERNEL=="dmfm[1-9]", SYMLINK+="sound/dmfm%n", GROUP="audio"
KERNEL=="midi", SYMLINK+="sound/midi", GROUP="audio"
KERNEL=="midi[1-9]", SYMLINK+="sound/midi%n", GROUP="audio"
KERNEL=="mixer", SYMLINK+="sound/mixer", GROUP="audio"
KERNEL=="mixer[1-9]", SYMLINK+="sound/mixer%n", GROUP="audio"
KERNEL=="music", SYMLINK+="sound/music", GROUP="audio"
KERNEL=="music[1-9]", SYMLINK+="sound/music%n", GROUP="audio"
KERNEL=="sequencer", SYMLINK+="sound/sequencer", GROUP="audio"
KERNEL=="sequencer[1-9]", SYMLINK+="sound/%k", GROUP="audio"
#KERNEL=="controlC[0-9]*", SYMLINK+="snd/%k", GROUP="audio"
#KERNEL=="hw[CD0-9]*", SYMLINK+="snd/%k", GROUP="audio"
#KERNEL=="pcm[CD0-9cp]*", SYMLINK+="snd/%k", GROUP="audio"
#KERNEL=="midi[CD0-9]*", SYMLINK+="snd/%k", GROUP="audio"
#KERNEL=="timer", SYMLINK+="snd/%k", GROUP="audio"
#KERNEL=="seq", SYMLINK+="snd/%k", GROUP="audio"
# IEEE1394 (firewire) devices (must be before raw devices below)
#KERNEL=="raw1394", NAME="%k"
# USB devices
#KERNEL=="hiddev*", SYMLINK+="usb/%k"
KERNEL=="legousbtower*", SYMLINK+="usb/%k"
KERNEL=="dabusb*", SYMLINK+="usb/%k"
# CAPI devices
KERNEL=="capi", SYMLINK+="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi*", SYMLINK+="capi/%n"
# DRM devices
#SUBSYSTEM=="drm", KERNEL=="card*", SYMLINK+="dri/%k"
#####################################
# Persistent block device stuff - end
#####################################
#ACTION=="add", SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev} B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"