diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 05:58:02 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 05:58:02 (GMT) |
commit | 6bcdc0236ae6c23bc9dd057913716af393af71ea (patch) | |
tree | a4cef43716cfa2040b11ae2ffb5867cd4a7ef6e7 | |
parent | 099ccac45c11ee6f96198367e9bea7040c9358c8 (diff) | |
download | linhes_pkgbuild-6bcdc0236ae6c23bc9dd057913716af393af71ea.zip linhes_pkgbuild-6bcdc0236ae6c23bc9dd057913716af393af71ea.tar.gz linhes_pkgbuild-6bcdc0236ae6c23bc9dd057913716af393af71ea.tar.bz2 |
udev:Bumped/Updated for LinHES 7.
-rw-r--r-- | abs/core-testing/udev/81-arch.rules | 94 | ||||
-rw-r--r-- | abs/core-testing/udev/PKGBUILD | 149 | ||||
-rw-r--r-- | abs/core-testing/udev/__changelog | 1 | ||||
-rw-r--r-- | abs/core-testing/udev/arch-udev-rules.patch | 172 | ||||
-rwxr-xr-x | abs/core-testing/udev/cdsymlinks.sh | 11 | ||||
-rwxr-xr-x | abs/core-testing/udev/load-modules.sh | 12 | ||||
-rw-r--r-- | abs/core-testing/udev/logitech-rules.patch | 14 | ||||
-rw-r--r-- | abs/core-testing/udev/mount-usb | 51 | ||||
-rw-r--r-- | abs/core-testing/udev/readme-udev-arch.txt | 266 | ||||
-rw-r--r-- | abs/core-testing/udev/resolve-modalias.c | 62 | ||||
-rwxr-xr-x | abs/core-testing/udev/start_udev | 137 | ||||
-rw-r--r-- | abs/core-testing/udev/udev-ntfs-3g.patch | 217 | ||||
-rw-r--r-- | abs/core-testing/udev/udev.install | 23 | ||||
-rw-r--r-- | abs/core-testing/udev/udev.rules | 456 | ||||
-rw-r--r-- | abs/core-testing/udev/usb-storage.rules | 4 |
15 files changed, 199 insertions, 1470 deletions
diff --git a/abs/core-testing/udev/81-arch.rules b/abs/core-testing/udev/81-arch.rules index 933cbc4..40e0a7c 100644 --- a/abs/core-testing/udev/81-arch.rules +++ b/abs/core-testing/udev/81-arch.rules @@ -1,8 +1,6 @@ # Udev rules for Archlinux by Tobias Powalowski <tpowa@archlinux.org> # do not edit this file, it will be overwritten on update # -# This ruleset should provide a DevFS-compatible device tree. -# # There are a number of modifiers that are allowed to be used in some # of the different fields. They provide the following subsitutions: # @@ -36,10 +34,8 @@ SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-seq-oss" #PNP addon modules SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0800", RUN+="/lib/udev/load-modules.sh pcspkr" -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP0510*", RUN+="/lib/udev/load-modules.sh irtty-sir" -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP0511*", RUN+="/lib/udev/load-modules.sh irtty-sir" +SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP051[01]*", RUN+="/lib/udev/load-modules.sh irtty-sir" SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNPb02f", RUN+="/lib/udev/load-modules.sh analog" -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0501", RUN+="/lib/udev/load-modules.sh ppp-generic" # PARPORT addon modules SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh lp" @@ -56,16 +52,16 @@ LABEL="drivers_end" ##################################### ###### CD/DVD symlinks - begin ##################################### -ACTION=="add", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", IMPORT="cdrom_id --export $tempnode" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", IMPORT="cdrom_id --export $tempnode" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="scd[a-z]", IMPORT="cdrom_id --export $tempnode" +ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", IMPORT="cdrom_id --export $tempnode" +ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", IMPORT="cdrom_id --export $tempnode" +ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="scd[a-z]", IMPORT="cdrom_id --export $tempnode" ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b" ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b" ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b" -ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvd-%b" -ACTION=="add", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", RUN+="cdsymlinks.sh" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh" +ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvdrw-%b" +ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", RUN+="cdsymlinks.sh" +ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh" +ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh" ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="hd[a-z]", RUN+="cdsymlinks.sh" ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sr[0-9]*", RUN+="cdsymlinks.sh" ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="cdsymlinks.sh" @@ -80,6 +76,9 @@ ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="cdsymlinks.sh" # fix /dev/root symlink SUBSYSTEM=="block", RUN+="root-link.sh" +# 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" @@ -88,7 +87,7 @@ SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", SYMLINK+="scd%n", GROU SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", GROUP="optical" # permissions for removable devices like cardreaders or sticks -KERNEL=="sd*", ATTRS{scsi_level}=="0", ATTRS{type}=="0", GROUP="storage" +KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="0", GROUP="storage" # permissions for firewire external drives KERNEL=="sd*", ATTRS{scsi_level}=="5", GROUP="storage" @@ -107,69 +106,38 @@ LABEL="pcmcia_end" # permissions for SCSI scanners SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="6", GROUP="scanner" -# md block devices -KERNEL=="md[0-9]*", NAME="md%n", SYMLINK+="md/%n" +# mem +KERNEL=="ram0", SYMLINK+="ramdisk" +KERNEL=="ram1", SYMLINK+="ram" + +# video4linux + +KERNEL=="vbi0", SYMLINK+="vbi" +KERNEL=="radio0", SYMLINK+="radio" +KERNEL=="radio[0-9]*", GROUP="video" +KERNEL=="video0", SYMLINK+="video" +KERNEL=="vtx0", SYMLINK+="vtx" # video devices -SUBSYSTEM=="video4linux", GROUP="video" ### xorg resets those permissions, adjust your xorg.conf! -KERNEL=="nvidia*", GROUP="video" KERNEL=="3dfx*", GROUP="video" - -# i2c devices -KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK+="%k" - -# loop devices -KERNEL=="loop[0-9]*", NAME="loop/%n", SYMLINK+="%k" +KERNEL=="fb[0-9]*", GROUP="video" # misc -KERNEL=="nvram", NAME="misc/%k", SYMLINK+="%k", GROUP="kmem", MODE="0640" -KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="uinput", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="sgi_fetchop", MODE="0666" -KERNEL=="sonypi", MODE="0666" -KERNEL=="inotify", NAME="misc/%k", SYMLINK+="%k", MODE="0666" - -# sound devices -# alsa devices -SUBSYSTEM=="sound", GROUP="audio" -# 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=="midi*", 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=="sgi_fetchop", MODE="0666" +KERNEL=="sonypi", MODE="0666" # USB devices -KERNEL=="hiddev*", NAME="usb/%k" -KERNEL=="legousbtower*", NAME="usb/%k", MODE="0666" -KERNEL=="dabusb*", NAME="usb/%k" - -# 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" +KERNEL=="legousbtower*", MODE="0666" # IEEE1394 (firewire) devices -KERNEL=="raw1394", NAME="%k", GROUP="video" +KERNEL=="raw1394", GROUP="video" # kbd devices -KERNEL=="kbd", MODE="0664" +KERNEL=="kbd", MODE="0664" +# miscellaneous +KERNEL=="rtc|rtc0", GROUP="audio", MODE="0664" ####################################### # Permissions and Symlinks - end ####################################### diff --git a/abs/core-testing/udev/PKGBUILD b/abs/core-testing/udev/PKGBUILD index c22b10b..2f71d28 100644 --- a/abs/core-testing/udev/PKGBUILD +++ b/abs/core-testing/udev/PKGBUILD @@ -1,96 +1,127 @@ -# $Id: PKGBUILD 22190 2008-12-22 18:25:11Z tpowa $ +# $Id: PKGBUILD 85315 2010-07-12 05:13:37Z tpowa $ # Maintainer: Aaron Griffin <aaron@archlinux.org> # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Bächler <thomas@archlinux.org> -pkgname=udev -pkgver=135 -pkgrel=7 -pkgdesc="The userspace dev tools (udev)" + +pkgbase="udev" +pkgname=('udev' 'udev-compat') +pkgver=160 +pkgrel=1 arch=(i686 x86_64) url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" license=('GPL') groups=('base') -depends=('glibc' 'coreutils' 'util-linux') -makedepends=('kernel26') #needed to build framebuffer blacklist -install=udev.install -backup=(etc/udev/udev.conf - etc/scsi_id.config - etc/udev/cdsymlinks.conf - etc/modprobe.d/framebuffer_blacklist) -conflicts=('pcmcia-cs' 'hotplug') -replaces=('devfsd') # older initscripts versions required start_udev -conflicts=('initscripts<2008.02') -options=(!makeflags) +options=(!makeflags !libtool) +makedepends=('glibc' 'coreutils' 'util-linux' 'libusb' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection') source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2 - 81-arch.rules load-modules.sh resolve-modalias.c cdsymlinks.sh root-link.sh - arch-udev-rules.patch readme-udev-arch.txt usb-storage.rules udev-ntfs-3g.patch mount-usb) -md5sums=('661b9df34e1304dad10f595d95b472bb' - '3a955ca8e2122a48a223f9d8adf87b70' - 'f4951f61438d69894b728212dac7318b' - 'fca04a608009069beb786e26338a783b' - '8424b78e9dd772e75b4ef90814807815' + 81-arch.rules load-modules.sh cdsymlinks.sh root-link.sh + arch-udev-rules.patch + logitech-rules.patch) +md5sums=('65459a1f090082c0471bf4e5112208d7' + '6393ee81993f8b9beb776ca904005864' + 'f91fddc67609b45b244a624977c4247b' + '2e808ee78d237c478b57af2a68d43769' '2d6dc6842464f107bccc68cd505a6c31' - 'ae216c26a6a5cae4a3ef9c0e1f7bfaa6' - '7fc6d33bb218e752302eef0a80ff0a89' - '11eaec41b77746f50975d4ef834c8f83') + '70198227b7bbe3852e1cd2299693af66' + '817537bdcfc1a4fa79e853fd38df4528') build() { cd $srcdir/$pkgname-$pkgver - patch -p1 < ../udev-ntfs-3g.patch || return 1 - ./configure --prefix="" --mandir=/usr/share/man --includedir=/usr/include - make || return 1 - make DESTDIR=$startdir/pkg install - + # fix logitech rules + patch -Np0 -i $srcdir/logitech-rules.patch + ./configure --prefix="" --mandir=/usr/share/man\ + --includedir=/usr/include\ + --libexecdir=/lib/udev\ + --datarootdir=/usr/share + make +} + +package_udev() { + pkgdesc="The userspace dev tools (udev)" + depends=('glibc' 'coreutils' 'util-linux' 'libusb' 'glib2' + 'module-init-tools>=3.11') + install=udev.install + backup=(etc/udev/udev.conf + etc/modprobe.d/framebuffer_blacklist.conf) + conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07') + replaces=('devfsd') + + cd $srcdir/$pkgname-$pkgver + make DESTDIR=${pkgdir} install # Fix pkgconfig path install -d -m755 $pkgdir/usr/lib mv $pkgdir/lib/pkgconfig $pkgdir/usr/lib - - # Non-stock rules still go in /etc - install -D -m644 $srcdir/81-arch.rules $pkgdir/etc/udev/rules.d/81-arch.rules - install -D -m644 $srcdir/usb-storage.rules $pkgdir/etc/udev/rules.d/usb-storage.rules - - # Scripts needed - mkdir $pkgdir/etc/udev/scripts - install -D -m744 $srcdir/mount-usb $pkgdir/etc/udev/scripts - + # Fix ConsoleKit path + mv $pkgdir/lib/ConsoleKit $pkgdir/usr/lib + # Install our rule for permissions and symlinks + install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules # install our module loading subsystem install -D -m755 $srcdir/load-modules.sh $pkgdir/lib/udev/load-modules.sh - install -d -m755 $pkgdir/bin - gcc -Wall $CFLAGS -o $pkgdir/bin/resolve-modalias $srcdir/resolve-modalias.c # install cdsymlinks.sh install -D -m755 $srcdir/cdsymlinks.sh $pkgdir/lib/udev/cdsymlinks.sh # install root-link.sh install -D -m755 $srcdir/root-link.sh $pkgdir/lib/udev/root-link.sh - - # install instructions - # NOTE: We should delete this file - install -D -m644 $srcdir/readme-udev-arch.txt $pkgdir/usr/share/udev/readme-udev-arch.txt - - # add devices dir - mkdir $pkgdir/lib/udev/devices # disable error logging to prevent startup failures printed to vc on boot sed -i -e 's|udev_log="err"|udev_log="0"|g' $pkgdir/etc/udev/udev.conf - # install additional rules files - for rule in $srcdir/$pkgname-$pkgver/rules/packages/*.rules; do - install -D -m 644 $rule $pkgdir/lib/udev/rules.d/ - done # fix standard udev rules to fit to arch cd $pkgdir/lib/udev/rules.d/ - patch -Np1 -i $srcdir/arch-udev-rules.patch || return 1 - - # remove the md-raid rules which are now provided by the mdadm package - rm -f $pkgdir/lib/udev/rules.d/64-md-raid.rules - + patch -Np1 -i $srcdir/arch-udev-rules.patch + # remove .orig files + rm -f $pkgdir/lib/udev/rules.d/*.orig # disable persistent cdromsymlinks and network by default # and move it to /etc/udev/rules.d mv $pkgdir/lib/udev/rules.d/75-persistent-net-generator.rules \ $pkgdir/etc/udev/rules.d/75-persistent-net-generator.rules.optional mv $pkgdir/lib/udev/rules.d/75-cd-aliases-generator.rules \ $pkgdir/etc/udev/rules.d/75-cd-aliases-generator.rules.optional + # create framebuffer blacklist mkdir -p $pkgdir/etc/modprobe.d/ for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko' -exec basename {} .ko \;); do - echo "blacklist $mod" >> $pkgdir/etc/modprobe.d/framebuffer_blacklist + echo "blacklist $mod" >> $pkgdir/etc/modprobe.d/framebuffer_blacklist.conf done + + # create static devices in /lib/udev/devices/ + mkdir ${pkgdir}/lib/udev/devices/pts + mkdir ${pkgdir}/lib/udev/devices/shm + + mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1 + mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3 + mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5 + mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11 + + ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd + ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin + ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout + ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr + ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core + + # these static devices are created for convenience, to autoload the modules if necessary + # /dev/loop0 + mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0 + chgrp disk ${pkgdir}/lib/udev/devices/loop0 + # /dev/net/tun + mkdir ${pkgdir}/lib/udev/devices/net + mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200 + # /dev/fuse + mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229 + # /dev/ppp + mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0 + + # Replace dialout group in rules with uucp group + for i in $pkgdir/lib/udev/rules.d/*.rules; do + sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g' $i + done + + mv "${pkgdir}/lib/girepository-1.0" "${pkgdir}/usr/lib/" +} + +package_udev-compat() { + pkgdesc="The userspace dev tools (udev) - additional rules for older kernels" + depends=('udev') + groups=('') + cd $srcdir/$pkgname-$pkgver + install -d -m755 ${pkgdir}/lib/${pkgname}/rules.d + install -D -m644 ${srcdir}/${pkgname}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules } diff --git a/abs/core-testing/udev/__changelog b/abs/core-testing/udev/__changelog deleted file mode 100644 index 7e00323..0000000 --- a/abs/core-testing/udev/__changelog +++ /dev/null @@ -1 +0,0 @@ -Added usb-storage.rule and script to un/mount USB drives. diff --git a/abs/core-testing/udev/arch-udev-rules.patch b/abs/core-testing/udev/arch-udev-rules.patch index b672731..ce00c85 100644 --- a/abs/core-testing/udev/arch-udev-rules.patch +++ b/abs/core-testing/udev/arch-udev-rules.patch @@ -1,136 +1,50 @@ -diff -Nur rules.d/60-persistent-storage.rules rules.d.arch/60-persistent-storage.rules ---- rules.d/60-persistent-storage.rules 2008-09-12 15:59:57.000000000 +0200 -+++ rules.d.arch/60-persistent-storage.rules 2008-09-12 16:00:50.000000000 +0200 -@@ -10,7 +10,7 @@ - SUBSYSTEM!="block", GOTO="persistent_storage_end" - - # skip rules for inappropriate block devices --KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*|btibm*", GOTO="persistent_storage_end" -+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|md*|btibm*", GOTO="persistent_storage_end" - - # never access non-cdrom removable ide devices, the drivers are causing event loops on open() - KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end" +diff -Nur rules.d/50-udev-default.rules rules.d.arch/50-udev-default.rules +--- rules.d/50-udev-default.rules 2009-03-07 22:22:48.200242883 +0100 ++++ rules.d.arch/50-udev-default.rules 2009-03-07 22:23:26.134434516 +0100 +@@ -59,15 +59,15 @@ + KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k" + + # cdrom +-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" +-SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" +-KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +-KERNEL=="pktcdvd", GROUP="cdrom" ++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="optical", MODE="0660" ++SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical", MODE="0660" ++KERNEL=="pktcdvd[0-9]*", GROUP="optical", MODE="0660" ++KERNEL=="pktcdvd", GROUP="optical", MODE="0660" + + # tape +-KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape" +-KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape" +-SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" ++KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="storage", MODE="0660" ++KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="storage", MODE="0660" ++SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage", MODE="0660" + + # block-related + KERNEL=="sch[0-9]*", GROUP="disk" diff -Nur rules.d/80-drivers.rules rules.d.arch/80-drivers.rules ---- rules.d/80-drivers.rules 2008-09-12 15:59:57.000000000 +0200 -+++ rules.d.arch/80-drivers.rules 2008-09-12 16:01:56.000000000 +0200 -@@ -2,14 +2,16 @@ - - ACTION!="add", GOTO="drivers_end" - --DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}" --SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms" --SUBSYSTEM=="memstick", RUN+="/sbin/modprobe --all ms_block mspro_block" --SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block" --SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block" --SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi" --SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg" --SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe ppdev" -+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/lib/udev/load-modules.sh $env{MODALIAS}" -+SUBSYSTEM=="tifm", RUN+="/lib/udev/load-modules.sh tifm_sd" -+SUBSYSTEM=="tifm", RUN+="/lib/udev/load-modules.sh tifm_ms" +--- rules.d/80-drivers.rules 2010-06-03 11:55:08.978720002 +0200 ++++ rules.d.arch/80-drivers.rules 2010-06-03 11:58:41.207865142 +0200 +@@ -2,12 +2,13 @@ + + ACTION=="remove", GOTO="drivers_end" + +-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}" +-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -bv tifm_sd" +-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe -bv tifm_ms" +-SUBSYSTEM=="memstick", RUN+="/sbin/modprobe -bv --all ms_block mspro_block" +-SUBSYSTEM=="i2o", RUN+="/sbin/modprobe -bv i2o_block" +-SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -bv sg" +-SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe -bv ppdev" ++DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/lib/udev/load-modules.sh $env{MODALIAS}" ++SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/lib/udev/load-modules.sh tifm_sd" ++SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/lib/udev/load-modules.sh tifm_ms" +SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh ms_block" +SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh mspro_block" -+SUBSYSTEM=="mmc", RUN+="/lib/udev/load-modules.sh mmc_block" -+SUBSYSTEM=="i2o", RUN+="/lib/udev/load-modules.sh i2o_block" -+SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/lib/udev/load-modules.sh ide-scsi" ++SUBSYSTEM=="i2o", RUN+="/lib/udev/load-modules.sh i2o_block" +SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/lib/udev/load-modules.sh sg" +SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/lib/udev/load-modules.sh ppdev" LABEL="drivers_end" - -diff -Nur rules.d/50-udev-default.rules rules.d.arch/50-udev-default.rules ---- rules.d/50-udev-default.rules 2008-09-12 15:59:57.000000000 +0200 -+++ rules.d.arch/50-udev-default.rules 2008-09-12 16:00:50.000000000 +0200 -@@ -4,12 +4,17 @@ - KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS+="last_rule" - KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS+="last_rule" - KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS+="last_rule" --KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", OPTIONS+="last_rule" --KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", OPTIONS+="last_rule" -+KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", NAME="vc/%n", SYMLINK+="%k" OPTIONS+="last_rule" -+KERNEL=="vcs", GROUP="tty", NAME="vcc/0", OPTIONS+="last_rule" -+KERNEL=="vcs[0-9]*", GROUP="tty", NAME="vcc/%n", OPTIONS+="last_rule" -+KERNEL=="vcsa", GROUP="tty", NAME="vcc/a0", OPTIONS+="last_rule" -+KERNEL=="vcsa[0-9]*", GROUP="tty", NAME="vcc/a%n", OPTIONS+="last_rule" - KERNEL=="console", MODE="0600", OPTIONS+="last_rule" - - # serial - KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp" -+KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="ttyS%n" -+KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK+="%k" - KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove" - KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp" - KERNEL=="hvc*|hvsi*", GROUP="uucp" -@@ -21,6 +26,7 @@ - KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640" - KERNEL=="ram0", SYMLINK+="ramdisk" - KERNEL=="ram1", SYMLINK+="ram" -+KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k" - - # input - KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" -@@ -36,13 +36,18 @@ - KERNEL=="vtx*|vbi*", GROUP="video" - KERNEL=="winradio*", GROUP="video" - KERNEL=="vbi0", SYMLINK+="vbi" --KERNEL=="radio0", SYMLINK+="radio" -+KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK+="%k" -+KERNEL=="radio0", SYMLINK+="video" -+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" - - # graphics --KERNEL=="agpgart", MODE="0600", GROUP="video" --KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666" --KERNEL=="fb0", SYMLINK+="fb" -+KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k", GROUP="video", MODE="0600" -+KERNEL=="card[0-9]*", NAME="dri/%k", GROUP="video", MODE="0666" -+KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video" - KERNEL=="pmu", GROUP="video" - KERNEL=="nvidia*|nvidiactl*", GROUP="video" - SUBSYSTEM=="graphics", GROUP="video" -@@ -62,19 +73,19 @@ - # block, tapes, block-releated - SUBSYSTEM=="block", GROUP="disk" - SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n" --KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" -+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions", GROUP="floppy" - KERNEL=="fd[0-9]", GROUP="floppy" --KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k" -+KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k" - KERNEL=="sch[0-9]*", GROUP="disk" --KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640" -+KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0660" - KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk" - KERNEL=="pg[0-9]*", GROUP="disk" - KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk" - KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" - KERNEL=="rawctl", NAME="raw/%k", GROUP="disk" - SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" --KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" --KERNEL=="pktcdvd", NAME="pktcdvd/control" -+KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="optical", MODE="0660" -+KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="optical", MODE="0660" - KERNEL=="qft0", SYMLINK+="ftape" - SUBSYSTEM=="bsg", NAME="bsg/%k" - SUBSYSTEM=="aoe", NAME="etherd/%k", GROUP="disk" -@@ -83,13 +94,13 @@ - KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove" - - # CPU --KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" --KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" -+KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", SYMLINK="%k" -+KERNEL=="msr[0-9]*", NAME="cpu/%n/msr", SYMLINK="%k" - KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" - - # miscellaneous - KERNEL=="fuse", MODE="0666" --KERNEL=="rtc|rtc0", MODE="0644" -+KERNEL=="rtc|rtc0", NAME="misc/%k", SYMLINK+="%k", GROUP="audio", MODE="0664" - KERNEL=="rtc0", SYMLINK+="rtc" - KERNEL=="auer[0-9]*", NAME="usb/%k" - KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" diff --git a/abs/core-testing/udev/cdsymlinks.sh b/abs/core-testing/udev/cdsymlinks.sh index c4185ac..498abda 100755 --- a/abs/core-testing/udev/cdsymlinks.sh +++ b/abs/core-testing/udev/cdsymlinks.sh @@ -1,11 +1,15 @@ #! /bin/sh # Creates cdsymlinks in /dev # for Archlinux by Tobias Powalowski <tpowa@archlinux.org> -if [ -d /dev/cd ]; then + +# check on cd/dvd drives and if persistant rules file is used +if [ -d /dev/cd -a ! -e /etc/udev/rules.d/75-persistent-cd.rules ]; then + # remove existing device files rm /dev/cdrom* rm /dev/cdrw* rm /dev/dvd* rm /dev/dvdrw* + # start creating symlinks for i in /dev/cd/cdrom-*; do if [ -h $i ]; then [ "$CD_NUMBER" = "" ] && ln -s $i /dev/cdrom @@ -37,9 +41,4 @@ if [ -d /dev/cd ]; then ! [ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="$((DVDRW_NUMBER+1))" && ln -s $i /dev/dvdrw$DVDRW_NUMBER fi done -else - rm /dev/cdrom* - rm /dev/cdrw* - rm /dev/dvd* - rm /dev/dvdrw* fi diff --git a/abs/core-testing/udev/load-modules.sh b/abs/core-testing/udev/load-modules.sh index a42d376..1e2af91 100755 --- a/abs/core-testing/udev/load-modules.sh +++ b/abs/core-testing/udev/load-modules.sh @@ -9,7 +9,7 @@ BLACKLIST="${MOD_BLACKLIST[@]}" MODPROBE="/sbin/modprobe" LOGGER="/usr/bin/logger" -RESOLVEALIAS="/bin/resolve-modalias" +RESOLVEALIAS="${MODPROBE} --resolve-alias" USEBLACKLIST="--use-blacklist" if [ -f /proc/cmdline ]; then @@ -42,11 +42,11 @@ if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then #sanitize the blacklist BLACKLIST="$(echo "$BLACKLIST" | sed -e 's|-|_|g')" # Try to find all modules for the alias - mods=$($RESOLVEALIAS /lib/modules/$(uname -r)/modules.alias $1) + mods=$($RESOLVEALIAS $1) # If no modules could be found, try if the alias name is a module name # In that case, omit the --use-blacklist parameter to imitate normal modprobe behaviour [ -z "${mods}" ] && $MODPROBE -qni $1 && mods="$1" && USEBLACKLIST="" - [ -z "${mods}" ] && $LOGGER -p info -t "$(basename $0)" "'$1' is not a valid module or alias name" + [ -z "${mods}" ] && $LOGGER -p local0.debug -t "$(basename $0)" "'$1' is not a valid module or alias name" for mod in ${mods}; do # Find the module and all its dependencies deps="$($MODPROBE -i --show-depends ${mod})" @@ -61,9 +61,9 @@ if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then for dep in $deps; do if echo "${BLACKLIST}" | /bin/grep -q -e " ${dep} " -e "^${dep} " -e " ${dep}\$"; then if [ "${dep}" = "${mod}" ]; then - $LOGGER -p info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because it is blacklisted" + $LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because it is blacklisted" else - $LOGGER -p info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because its dependency '${dep}' is blacklisted" + $LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because its dependency '${dep}' is blacklisted" fi continue 2 fi @@ -74,7 +74,7 @@ if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then $MODPROBE $USEBLACKLIST ${mod} done else - $MODPROBE $1 + $MODPROBE $USEBLACKLIST $1 fi fi # vim: set et ts=4: diff --git a/abs/core-testing/udev/logitech-rules.patch b/abs/core-testing/udev/logitech-rules.patch new file mode 100644 index 0000000..fd0aea4 --- /dev/null +++ b/abs/core-testing/udev/logitech-rules.patch @@ -0,0 +1,14 @@ +--- - 2010-07-04 14:50:15.979139552 +0200 ++++ extras/hid2hci/70-hid2hci.rules 2010-07-03 21:03:40.685341704 +0200 +@@ -11,9 +11,9 @@ + RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1" + + # Logitech devices (hidraw) +-KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345bce]|c71[34bc]", \ ++KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345e]|c71[34]", \ + RUN+="hid2hci --method=logitech-hid --devpath=%p" +-KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70a", \ ++KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[abc]|c71[bc]", \ + RUN+="hid2hci --method=logitech-hid --devpath=%p" + + ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" diff --git a/abs/core-testing/udev/mount-usb b/abs/core-testing/udev/mount-usb deleted file mode 100644 index 2d3b3f5..0000000 --- a/abs/core-testing/udev/mount-usb +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - - -DIR=/media -DEVICE=$2 -LABEL=`/lib/udev/vol_id -L /dev/$DEVICE` -FS=`/lib/udev/vol_id -t /dev/$DEVICE` - - -mount_device () { - if [ "$LABEL" == "" ]; - then - mkdir -p $DIR/usb-$DEVICE - case $FS in - vfat) /bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/$DEVICE $DIR/usb-$DEVICE - ;; - *) /bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/$DEVICE $DIR/usb-$DEVICE - ;; - esac - else - mkdir -p $DIR/$LABEL - echo $LABEL >$DIR/.$DEVICE - case $FS in - vfat) /bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/$DEVICE $DIR/$LABEL - ;; - *) /bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/$DEVICE $DIR/$LABEL - ;; - esac - fi -} - -umount_device () { - if [ -e $DIR/usb-$DEVICE ]; - then - umount -l $DIR/usb-$DEVICE - rmdir $DIR/usb-$DEVICE; - else - ULABEL=`cat $DIR/.$DEVICE` - umount -l $DIR/$ULABEL - rmdir $DIR/$ULABEL - rm $DIR/.$DEVICE; - fi -} - -case $1 in - mount) mount_device - ;; - umount) umount_device - ;; - *) echo "Usage: mount-usb mount/umount sdxY" -esac diff --git a/abs/core-testing/udev/readme-udev-arch.txt b/abs/core-testing/udev/readme-udev-arch.txt deleted file mode 100644 index e903a6b..0000000 --- a/abs/core-testing/udev/readme-udev-arch.txt +++ /dev/null @@ -1,266 +0,0 @@ -========================== -Cold/Hotplugging with Udev -========================== -Version 1.1.6 -written by Tobias Powalowski <tpowa@archlinux.org> - ---------------- -* Requirements: ---------------- -- recommended kernel >=2.6.18 for this udev to work properly. -- No more DevFS device paths! If you have them, update /etc/fstab: - /dev/discs/... etc. has been deprecated in favor of the old style: - /dev/discs/disc0/part1 -> /dev/hda1 - /dev/discs/disc1/part2 -> /dev/hdb2 -- /etc/modprobe.conf should be cleaned from old install entries (see below). - ---------------- -* Udev Changes: ---------------- -- The syntax of udev rules has been changed in >=098 release, please update your rules. - --- Snip Changelog Udev 098 - Renaming of some key names: - BUS -> SUBSYSTEMS - ID -> KERNELS - SYSFS -> ATTRS - DRIVER -> DRIVERS - ATTR{file}="value" can be used now, to write to a sysfs file of the - event device. Instead of: - ..., SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'" - we now can do: - ..., ATTR{type}=="0|7|14", ATTR{timeout}="60" - All the PHYSDEV* keys are deprecated and will be removed from a - future kernel: - PHYDEVPATH - is the path of a parent device and should not be - needed at all. - PHYSDEVBUS - is just a SUBSYSTEM value of a parent, and can be - matched with SUBSYSTEMS== - PHYSDEVDRIVER - for bus devices it is available as ENV{DRIVER}. - Newer kernels will have DRIVER in the environment, - for older kernels udev puts in. Class device will - no longer carry this property of a parent and - DRIVERS== can be used to match such a parent value. - Note that ENV{DRIVER} is only available for a few bus devices, where - the driver is already bound at device event time. On coldplug, the - events for a lot devices are already bound to a driver, and they will have - that value set. But on hotplug, at the time the kernel creates the device, - it can't know what driver may claim the device after that, therefore - in most cases it will be empty. - --- snap Changelog Udev 098 -- optional udev >= 099 Persistent rules generator for network and cd/dvd devices was added. -- default udev rules are installed to /lib/udev/rules.d/, they can be overriden by placing - own rules files to /etc/udev/rules.d/ . - ---------------- -* How it works: ---------------- -- Udev replaces the functionality of hotplug and hwdetect scripts. -- Udev does autoloading of modules and coldplugging. -- Udev loads the modules simultaneously, which is much faster, - but can cause some troubles with multiple network/sound/etc devices - (see below). -- To reload your rules please use '/sbin/udevadm trigger'. - -====================== -* Autoloading modules: -====================== - -------------------------------------------------------------------------- -* Module autoloading is controlled by MOD_AUTOLOAD="" in /etc/rc.conf -------------------------------------------------------------------------- -MOD_AUTOLOAD="yes" in /etc/rc.conf is necessary: -- if you want module autodetection -- if you want modules be loaded by udev (hotplugging and coldplugging) - -MOD_AUTOLOAD="no" is necessary: -- if you want to load modules strictly using 'modprobe <module>' -- if you want to load only the modules listed in the MODULES=() array - in /etc/rc.conf - ---------------- -* Blacklisting: ---------------- -- means udev will never try to load the module, even if MOD_AUTOLOAD="yes" - is set. - -You can do this in 2 ways: -- MOD_BLACKLIST=(moduleA moduleB) -- MODULES=(!moduleA !moduleB) - -Both entries mean the same thing to udev. MOD_BLACKLIST was used by hwdetect. -hwdetect does not understand the MODULES= syntax, but it doesn't have to -- it -is only used in mkinitrd now. - -================================== -* Boot parameter: load_modules=off -================================== - -- No modules are loaded during boot using udev autoloading or the MODULES array -- Useful for repairing your system if something goes wrong during udev startup - and/or during loading modules - -================================== -* Boot parameter: disablemodules= -================================== - -- list modules there that shouldn't be loaded by udev -- Syntax: disablemodules=module1,module2,module3,... -- Useful for repairing your system if something goes wrong during udev startup - and/or during loading modules and you know the module that causes the trouble. - -======================================== -* Persistent CD/DVD symlinks (optional): -======================================== - -- To enable this feature copy in /etc/udev/rules.d - 75-cd-aliases-generator.rules.optinal - to 75-cd-aliases-generator.rules - Also disable this part in /lib/udev/rules.d/81-arch.rules by putting a # in front: - --- snip - ACTION=="add", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", RUN+="/lib/udev/cdsymlinks.sh" - ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="/lib/udev/cdsymlinks.sh" - ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="/lib/udev/cdsymlinks.sh" - ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="hd[a-z]", RUN+="/lib/udev/cdsymlinks.sh" - ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sr[0-9]*", RUN+="/lib/udev/cdsymlinks.sh" - ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="/lib/udev/cdsymlinks.sh" ---- snap - -- To get the same device name for CD/DVD symlinks each time you boot, - a rule will be generated during bootup or by executing '/sbin/udevadm trigger'. -- Examples: dvd, cdrom ,cdrw etc. -- If you want to change those links, - modify '/etc/udev/rules.d/70-peristent-cd.rules' to your needs. - -Known issues: -The symlink name is then bound to the hardware pci adress, -if you change your CD/DVD device, you have to check the -/etc/udev/rules.d/70-peristent-net.rules file for correctness. - -====================================== -* Persistent Network names (optional): -====================================== - -- To enable this feature copy in /etc/udev/rules.d - 75-persistent-net-generator.rules.optional - to 75-persistent-net-generator.rules -- To get the same network device name each time you boot, - a rule will be generated during bootup or by executing '/sbin/udevadm trigger'. -- Examples: eth0, eth1, wlan0 etc. -- If you want to change those names, - modify '/etc/udev/rules.d/70-peristent-net.rules' to your needs. -- NAME= determines the name of your network card. Use these names in your - network configuration in rc.conf as well. - -Known issues: -The interface name is then bound to the hardware mac adress, -if you change your network card, you have to check the -/etc/udev/rules.d/70-peristent-net.rules file for correctness. - -==================================== -* Known Problems Hardware: -==================================== - -- BusLogic devices are broken and will cause a freeze during startup -Solution: -This is a kernel bug and no fix has been provided yet. - -- PCMCIA Card readers are not treated as removabel devices. -Solution: -To get access to them with hal's pmount backend add them to /etc/pmount.allow - -==================================== -* Known Problems MOD_AUTOLOAD="yes": -==================================== - ------------------------------------------------------------------------------ -* Sound is not working or modules (eg. parport) are not loaded automatically: ------------------------------------------------------------------------------ -Solution: -- Do you have a clean /etc/modprobe.conf? - - A clean /etc/modprobe.conf is empty. The stock modprobe.conf file - contains nothing -- alsaconf can write output to modprobe.conf. Please keep that in mind. - ---------------------------------------------- -* Devices get mixed up eg. Network/Soundcards ---------------------------------------------- -- Because udev loads all the modules at once, sometimes devices are initialized - in different orders (eg. network cards switch eth0 and eth1, sound cards - the same) - -Solution: -- Load them in MODULES=() array in the order you need them -- eg: MODULES=(moduleA moduleB) - -Second solution for network: -- The "proper" way to configure net interfaces to hold static names within - udev rules. Add lines like these to a custom rules file such as - /etc/udev/rules.d/01-network.rules: - SUBSYSTEM=="net", SYSFS{address}=="aa:bb:cc:dd:ee:ff", NAME="lan0" - SUBSYSTEM=="net", SYSFS{address}=="ff:ee:dd:cc:bb:aa", NAME="wlan0" - -- To get the right mac address use this command: - udevinfo -a -p /sys/class/net/<yourdevice> -- Make sure you use lower-case hex values in your udev rules. -- NAME= determines the name of your network card. Use these names in your - network configuration in rc.conf as well. - -Third solution for network: -- check Persistent Network part - ------------------------------------ -* Network 8139too & 8139cp problem: ------------------------------------ -- Both modules have the same kernel entry, which can cause problems. -Solution: -- Enter the one you need in MODULES=() and blacklist the other one -- eg: MODULES=(!8139cp 8139too) -- The example tells udev to ignore 8139cp module and load 8139too afterwards. - --------------------------------------------------------- -* You need a special loading order to get devices going: --------------------------------------------------------- -- Kernel loads modules in wrong order. -Solution: -- Load them in the correct order in MODULES=() - ------------------------------ -* Module is not autodetected: ------------------------------ -- If your device does not provide a modalias in /sys it cannot be autodetected. -- If modalias is not combined to a kernel module it cannot be autodetected. -Known modules that are not autodetected: -- SCSI CONTROLLER: - scsi_transport_sas ultrastor qlogicfas eata BusLogic pas16 wd7000 sym53c416 - g_NCR5380_mmio fdomain u14-34f dtc initio in2000 imm t128 aha1542 aha152x - atp870u g_NCR5380 NCR53c406a qlogicfas408 megaraid_mm advansys -- NETWORK CARDS: - hp ne de4x5 wd cs89x0 eepro smc9194 seeq8005 ni52 ni65 ac3200 smc-ultra - at1700 hp-plus depca eexpress 82596 de600 eth16i de620 lance ewrk3 e2100 - lp486e 3c501 3c503 3c505 3c507 3c509 3c515 myri10ge -Solution: -- Enter the one you need in MODULES=() - -======================================= -* Known Problems with MOD_AUTOLOAD="no" -======================================= - ------------------------------------------------------------------ -* Modules are not loaded anymore during coldplug or hotplug event ------------------------------------------------------------------ -- Udev is usually responsible for this, but the MOD_AUTOLOAD switch will - now disable it. If you want automatic hot/cold-plugging, turn on - MOD_AUTOLOAD. Otherwise you will have to load all your modules manually, - either with /sbin/modprobe or entries in the MODULES=() array. -Solution: -- For bootup (coldplug) enter this in rc.conf: MODULES=(moduleA moduleB) -- After bootup (hotplug) use this: modprobe <moduleA> - -========================================= -* Known problems for custom kernel users: -========================================= - ----------------------------- -* Udev doesn't start at all: ----------------------------- -- Check Requirements list diff --git a/abs/core-testing/udev/resolve-modalias.c b/abs/core-testing/udev/resolve-modalias.c deleted file mode 100644 index d1680b1..0000000 --- a/abs/core-testing/udev/resolve-modalias.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <fnmatch.h> -#include <string.h> -#include <malloc.h> - -static char *getline(FILE *file) { - static size_t size = 1024; - static char *buf = NULL; - static unsigned int i = 0, r = 0;; - - if(buf == NULL) - buf = (char*)malloc(size); - - if(i) { - memmove(buf, buf+i, size-i); - r -= i; - i = 0; - } - - while(1) { - if(i == size) { - size *= 2; - buf = (char*)realloc(buf, size); - } - - if(i==r) - r += fread(buf+i, 1, size-i, file); - - if(i==r && i == 0) { - free(buf); - buf = NULL; - r = 0; - return NULL; - } - - if(i==r || buf[i] == '\n') { - buf[i++] = '\0'; - return buf; - } - i++; - } -} - -int main(int argc, char *argv[]) { - FILE *f=fopen(argv[1], "r"); - char *line, *pattern, *module; - char *pos1, *pos2; - - while((line=getline(f))!=NULL) { - if(!strncmp(line, "alias", strlen("alias"))) { - pos1 = index(line, ' '); - pos2 = index(pos1+1, ' '); - pattern = pos1+1; - *pos2 = '\0'; - module = pos2+1; - - if(!fnmatch(pattern, argv[2], 0)) - printf("%s\n", module); - } - } - return 0; -} diff --git a/abs/core-testing/udev/start_udev b/abs/core-testing/udev/start_udev deleted file mode 100755 index 03c38fd..0000000 --- a/abs/core-testing/udev/start_udev +++ /dev/null @@ -1,137 +0,0 @@ -#! /bin/sh -# -# start_udev -# script to initialize /dev by using udev. -# -# Modified for Archlinux by Tobias Powalowski <tpowa@archlinux.org> -# -# Inspired by: -# -# Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> -# -# Released under the GPL v2 only. -# -# This needs to be run at the earliest possible point in the boot -# process. -# -# Based on the udev init.d script -# -# Thanks go out to the Gentoo developers for proving -# that this is possible to do. -# -# Yes, it's very verbose, feel free to turn off all of the echo calls, -# they were there to make me feel better that everything was working -# properly during development... -# - -prog=udev -sysfs_dir=/sys -bin=/sbin/udev -udevd=/sbin/udevd -udev_root="/dev" - -starttime=$(date +%s) - - -function trigger_builtin_events() { - list="$(echo /sys/class/tty/ttyS*/uevent)" - for i in $list; do - case "$i" in - */class/uevent|*\**) - continue - ;; - */class/tty/ttyS*) - echo "add" > "$i" - ;; - esac - done - } - -function trigger_device_events() { - /sbin/udevtrigger -} - -function wait_for_queue() { -# loop=20 -# while ! [ "$loop" -gt 0 -a -d /dev/.udev/queue ]; do -# sleep 0.1; -# loop=$(($loop - 1)) -# done - /sbin/udevsettle -} - -make_extra_nodes () { - # there are a few things that sysfs does not export for us. - # these things go here (and remember to remove them in - # remove_extra_nodes() - # - # Thanks to Gentoo for the initial list of these. - ln -snf /proc/self/fd $udev_root/fd - ln -snf /proc/self/fd/0 $udev_root/stdin - ln -snf /proc/self/fd/1 $udev_root/stdout - ln -snf /proc/self/fd/2 $udev_root/stderr - ln -snf /proc/kcore $udev_root/core - - mkdir $udev_root/pts - mkdir $udev_root/shm -} - -udev_init () { -# don't use udev if sysfs is not mounted. -if [ ! -d $sysfs_dir/block ]; then - exit 1 -fi - -echo "mounting... ramfs at $udev_root" -mount -n -t ramfs none $udev_root - -# propogate /udev from /sys -echo "Creating initial udev device nodes:" - -#echo "making extra nodes" -make_extra_nodes - -# check if udevd is already running -if [ `pidof -o %PPID /sbin/udevd` ]; then - grep -v "/dev/shm" /etc/mtab | grep -v "/dev/pts" > /etc/mtab - mount /dev/pts - mount /dev/shm -else - echo "start udev daemon" - /sbin/udevd --daemon -fi -case "$(uname -r)" in - 2.6.[0-9]|2.6.[0-9][!0-9]*) ;; - *) if [ -f "/sys/class/tty/console/uevent" ]; then - echo "Kernel >= 2.6.15 and supports uevents" - # trigger the sorted events - echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - # catch events that are real fast - mkdir -p /dev/.udev/queue - trigger_builtin_events - else - # for older kernels without uevents will be removed when udevstart dies in udev - echo "Kernel does not support uevents, you need a kernel >= 2.6.15!" - exit 1 - fi - ;; -esac -} - -udev_uevents () { -# configure all devices -trigger_device_events -# until we know how to do better, just wait for _all_ events to finish -wait_for_queue -} - -if [ $# -eq 0 ]; then -udev_init -udev_uevents -fi - -[ "$1" = "init" ] && udev_init -[ "$1" = "uevents" ] && udev_uevents - -echo "udev startup is finished! - time = $(( `date +%s` - $starttime ))" -exit 0 diff --git a/abs/core-testing/udev/udev-ntfs-3g.patch b/abs/core-testing/udev/udev-ntfs-3g.patch deleted file mode 100644 index 366c41f..0000000 --- a/abs/core-testing/udev/udev-ntfs-3g.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff -ruaN udev-135.orig/extras/volume_id/lib/ntfs.c udev-135/extras/volume_id/lib/ntfs.c ---- udev-135.orig/extras/volume_id/lib/ntfs.c 2008-11-13 20:42:56.000000000 +0000 -+++ udev-135/extras/volume_id/lib/ntfs.c 2009-06-28 23:31:01.000000000 +0000 -@@ -194,7 +194,7 @@ - } - - volume_id_set_usage(id, VOLUME_ID_FILESYSTEM); -- id->type = "ntfs"; -+ id->type = "ntfs-3g"; - /* we think this is ntfs, but we make sure no other signatures are found */ - id->force_unique_result = 1; - return 0; -diff -ruaN udev-135.orig/extras/volume_id/lib/ntfs.c~ udev-135/extras/volume_id/lib/ntfs.c~ ---- udev-135.orig/extras/volume_id/lib/ntfs.c~ 1970-01-01 00:00:00.000000000 +0000 -+++ udev-135/extras/volume_id/lib/ntfs.c~ 2008-11-13 20:42:56.000000000 +0000 -@@ -0,0 +1,201 @@ -+/* -+ * volume_id - reads filesystem label and uuid -+ * -+ * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org> -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <http://www.gnu.org/licenses/>. -+ */ -+ -+#ifndef _GNU_SOURCE -+#define _GNU_SOURCE 1 -+#endif -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <string.h> -+#include <errno.h> -+#include <ctype.h> -+ -+#include "libvolume_id.h" -+#include "libvolume_id-private.h" -+ -+static struct ntfs_super_block { -+ uint8_t jump[3]; -+ uint8_t oem_id[8]; -+ uint16_t bytes_per_sector; -+ uint8_t sectors_per_cluster; -+ uint16_t reserved_sectors; -+ uint8_t fats; -+ uint16_t root_entries; -+ uint16_t sectors; -+ uint8_t media_type; -+ uint16_t sectors_per_fat; -+ uint16_t sectors_per_track; -+ uint16_t heads; -+ uint32_t hidden_sectors; -+ uint32_t large_sectors; -+ uint16_t unused[2]; -+ uint64_t number_of_sectors; -+ uint64_t mft_cluster_location; -+ uint64_t mft_mirror_cluster_location; -+ int8_t cluster_per_mft_record; -+ uint8_t reserved1[3]; -+ int8_t cluster_per_index_record; -+ uint8_t reserved2[3]; -+ uint8_t volume_serial[8]; -+ uint16_t checksum; -+} PACKED *ns; -+ -+static struct master_file_table_record { -+ uint8_t magic[4]; -+ uint16_t usa_ofs; -+ uint16_t usa_count; -+ uint64_t lsn; -+ uint16_t sequence_number; -+ uint16_t link_count; -+ uint16_t attrs_offset; -+ uint16_t flags; -+ uint32_t bytes_in_use; -+ uint32_t bytes_allocated; -+} PACKED *mftr; -+ -+static struct file_attribute { -+ uint32_t type; -+ uint32_t len; -+ uint8_t non_resident; -+ uint8_t name_len; -+ uint16_t name_offset; -+ uint16_t flags; -+ uint16_t instance; -+ uint32_t value_len; -+ uint16_t value_offset; -+} PACKED *attr; -+ -+static struct volume_info { -+ uint64_t reserved; -+ uint8_t major_ver; -+ uint8_t minor_ver; -+} PACKED *info; -+ -+#define MFT_RECORD_VOLUME 3 -+#define MFT_RECORD_ATTR_VOLUME_NAME 0x60 -+#define MFT_RECORD_ATTR_VOLUME_INFO 0x70 -+#define MFT_RECORD_ATTR_OBJECT_ID 0x40 -+#define MFT_RECORD_ATTR_END 0xffffffffu -+ -+int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size) -+{ -+ unsigned int sector_size; -+ unsigned int cluster_size; -+ uint64_t mft_cluster; -+ uint64_t mft_off; -+ unsigned int mft_record_size; -+ unsigned int attr_type; -+ unsigned int attr_off; -+ unsigned int attr_len; -+ unsigned int val_off; -+ unsigned int val_len; -+ const uint8_t *buf; -+ const uint8_t *val; -+ -+ info("probing at offset 0x%" PRIx64 "\n", off); -+ -+ ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200); -+ if (ns == NULL) -+ return -1; -+ -+ if (memcmp(ns->oem_id, "NTFS", 4) != 0) -+ return -1; -+ -+ volume_id_set_uuid(id, ns->volume_serial, 0, UUID_64BIT_LE); -+ -+ sector_size = le16_to_cpu(ns->bytes_per_sector); -+ if (sector_size < 0x200) -+ return -1; -+ -+ cluster_size = ns->sectors_per_cluster * sector_size; -+ mft_cluster = le64_to_cpu(ns->mft_cluster_location); -+ mft_off = mft_cluster * cluster_size; -+ -+ if (ns->cluster_per_mft_record < 0) -+ /* size = -log2(mft_record_size); normally 1024 Bytes */ -+ mft_record_size = 1 << -ns->cluster_per_mft_record; -+ else -+ mft_record_size = ns->cluster_per_mft_record * cluster_size; -+ -+ dbg("sectorsize 0x%x\n", sector_size); -+ dbg("clustersize 0x%x\n", cluster_size); -+ dbg("mftcluster %" PRIu64 "\n", mft_cluster); -+ dbg("mftoffset 0x%" PRIx64 "\n", mft_off); -+ dbg("cluster per mft_record %i\n", ns->cluster_per_mft_record); -+ dbg("mft record size %i\n", mft_record_size); -+ -+ buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size), -+ mft_record_size); -+ if (buf == NULL) -+ return -1; -+ -+ mftr = (struct master_file_table_record*) buf; -+ dbg("mftr->magic '%c%c%c%c'\n", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]); -+ if (memcmp(mftr->magic, "FILE", 4) != 0) -+ return -1; -+ -+ attr_off = le16_to_cpu(mftr->attrs_offset); -+ dbg("file $Volume's attributes are at offset %i\n", attr_off); -+ -+ while (1) { -+ attr = (struct file_attribute*) &buf[attr_off]; -+ attr_type = le32_to_cpu(attr->type); -+ attr_len = le16_to_cpu(attr->len); -+ val_off = le16_to_cpu(attr->value_offset); -+ val_len = le32_to_cpu(attr->value_len); -+ attr_off += attr_len; -+ -+ if (attr_len == 0) -+ break; -+ -+ if (attr_off >= mft_record_size) -+ break; -+ -+ if (attr_type == MFT_RECORD_ATTR_END) -+ break; -+ -+ dbg("found attribute type 0x%x, len %i, at offset %i\n", -+ attr_type, attr_len, attr_off); -+ -+ if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) { -+ dbg("found info, len %i\n", val_len); -+ info = (struct volume_info*) (((uint8_t *) attr) + val_off); -+ snprintf(id->type_version, sizeof(id->type_version)-1, -+ "%u.%u", info->major_ver, info->minor_ver); -+ } -+ -+ if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) { -+ dbg("found label, len %i\n", val_len); -+ if (val_len > VOLUME_ID_LABEL_SIZE) -+ val_len = VOLUME_ID_LABEL_SIZE; -+ -+ val = ((uint8_t *) attr) + val_off; -+ volume_id_set_label_raw(id, val, val_len); -+ volume_id_set_label_unicode16(id, val, LE, val_len); -+ } -+ } -+ -+ volume_id_set_usage(id, VOLUME_ID_FILESYSTEM); -+ id->type = "ntfs"; -+ /* we think this is ntfs, but we make sure no other signatures are found */ -+ id->force_unique_result = 1; -+ return 0; -+} diff --git a/abs/core-testing/udev/udev.install b/abs/core-testing/udev/udev.install index bb8b166..b4ce3c8 100644 --- a/abs/core-testing/udev/udev.install +++ b/abs/core-testing/udev/udev.install @@ -1,15 +1,16 @@ # arg 1: the new package version # arg 2: the old package version + post_upgrade() { -if [ "$(vercmp $2 100)" -lt 0 ]; then - echo "ATTENTION UDEV:" - echo "----------" - echo "udev >=098 rules syntax has changed, please update your own rules." - echo "udev >=099 Added persistent network and CD/DVD Symlink generator rules." - echo "Please read the instructions carefully before reboot." - echo "They are located in /etc/udev/readme-udev-arch.txt" - echo "----------" -fi + if [ "$(vercmp $2 100)" -lt 0 ]; then + echo "ATTENTION UDEV:" + echo "----------" + echo "udev >=098 rules syntax has changed, please update your own rules." + echo "udev >=099 Added persistent network and CD/DVD Symlink generator rules." + echo "Please read the instructions carefully before reboot." + echo "They are located in /etc/udev/readme-udev-arch.txt" + echo "----------" + fi } post_install() { @@ -26,7 +27,3 @@ post_install() { rmdir ${ROOTDIR} fi } - -op=$1 -shift -$op $* diff --git a/abs/core-testing/udev/udev.rules b/abs/core-testing/udev/udev.rules deleted file mode 100644 index f789e50..0000000 --- a/abs/core-testing/udev/udev.rules +++ /dev/null @@ -1,456 +0,0 @@ -# Udev rules for Archlinux by Tobias Powalowski <tpowa@archlinux.org> -# -# This ruleset should provide a DevFS-compatible device tree. -# -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %k the kernel name for the device. -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute. -# %% the '%' char itself. -# -# 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. -# global stuff -# - -##################################### -# Early rules - begin -##################################### -# wait for sysfs -ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -# Setting timeout for tape-devices (type 1) to 900 seconds -# and 60 seconds for device types 0, 7 and 14 -SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60" -SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900" -##################################### -# Early rules -end -##################################### - -##################################### -###### Hotplug rules - begin -##################################### -# check if the device has already been claimed by a driver -ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded" -ACTION!="add", GOTO="hotplug_not_add_event" - -#Skip auto-loading of framebuffer devices -KERNEL=="fb[0-9]*", GOTO="hotplug_driver_loaded" - -# Modaliases to load -ENV{MODALIAS}=="?*", RUN{ignore_error}+="/lib/udev/load-modules.sh $env{MODALIAS}" - -# SCSI addon modules -SUBSYSTEM=="scsi", ATTRS{type}=="[07]", RUN+="/lib/udev/load-modules.sh sd_mod" -SUBSYSTEM=="scsi", ATTRS{type}=="14", RUN+="/lib/udev/load-modules.sh sd_mod" -SUBSYSTEM=="scsi", ATTRS{type}=="[45]", RUN+="/lib/udev/load-modules.sh sr_mod" -SUBSYSTEM=="scsi", ATTRS{type}=="1", ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*", RUN+="/lib/udev/load-modules.sh osst" -SUBSYSTEM=="scsi", ATTRS{type}=="1", ATTRS{vendor}=="Onstream", ATTRS{model}=="ADR*", RUN+="/lib/udev/load-modules.sh st" -SUBSYSTEM=="scsi", ATTRS{type}=="1", ATTRS{vendor}!="Onstream", RUN+="/lib/udev/load-modules.sh st" -SUBSYSTEM=="scsi", ATTRS{type}=="[235689]", TEST!="[module/sg]", RUN+="/lib/udev/load-modules.sh sg" - -# load sg module for burners -SUBSYSTEM=="block", ATTRS{type}=="[45]", RUN+="/lib/udev/load-modules.sh sg" - -# MMC block devices -SUBSYSTEM=="mmc", RUN+="/lib/udev/load-modules.sh mmc_block" - -# I2O block devices -SUBSYSTEM=="i2o", RUN+="/lib/udev/load-modules.sh i2o_block" - -# Skip already claimed drivers -DRIVERS=="?*", GOTO="hotplug_driver_loaded" - -# PNP modules -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/load-modules.sh pnp:d$$id; /lib/udev/load-modules.sh pnp:c$$id ; done < /sys$devpath/id'" - -# SOUND addon modules -SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-pcm-oss" -SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-seq-oss" - -LABEL="hotplug_driver_loaded" - -#PNP addon modules -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0800", RUN+="/lib/udev/load-modules.sh pcspkr" -# not needed anymore with kernel >= 2.6.21 -#ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0b00", RUN+="/lib/udev/load-modules.sh rtc" -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0b00", RUN+="/lib/udev/load-modules.sh rtc_cmos" -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP0510*", RUN+="/lib/udev/load-modules.sh irtty-sir" -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP0511*", RUN+="/lib/udev/load-modules.sh irtty-sir" -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNPb02f", RUN+="/lib/udev/load-modules.sh analog" -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0501", RUN+="/lib/udev/load-modules.sh ppp-generic" - -# PARPORT addon modules -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh lp" -ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh ppdev" - -# fix ide cdrom detection on old proliant servers -ACTION=="add", SUBSYSTEM=="pci", ENV{MODALIAS}=="pci:v00000E11d00000001sv00000000sd00000000bc06sc02i00", RUN+="/lib/udev/load-modules.sh ide-generic" - -# FIRMWARE -ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="?*", RUN+="/lib/udev/firmware.sh" -LABEL="hotplug_not_add_event" -##################################### -##### Hotplug rules - end -##################################### - -##################################### -###### CD/DVD symlinks - begin -##################################### -ACTION=="add", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", IMPORT="/lib/udev/cdrom_id --export $tempnode" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", IMPORT="/lib/udev/cdrom_id --export $tempnode" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="scd[a-z]", IMPORT="/lib/udev/cdrom_id --export $tempnode" -ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b" -ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b" -ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b" -ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvd-%b" -ACTION=="add", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", RUN+="/lib/udev/cdsymlinks.sh" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="/lib/udev/cdsymlinks.sh" -ACTION=="add", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="/lib/udev/cdsymlinks.sh" -ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="hd[a-z]", RUN+="/lib/udev/cdsymlinks.sh" -ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sr[0-9]*", RUN+="/lib/udev/cdsymlinks.sh" -ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="/lib/udev/cdsymlinks.sh" -##################################### -###### CD/DVD symlinks - end -##################################### - -# fix /dev/root symlink -SUBSYSTEM=="block", RUN+="/lib/udev/root-link.sh" - -##################################### -# Permissions and Symlinks - begin -##################################### -# default permissions for all block devices -SUBSYSTEM=="block", GROUP="disk" - -# 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 IDE floppy devices -SUBSYSTEMS=="ide", KERNEL=="hd*", ATTRS{media}=="floppy*", NAME{all_partitions}="%k", GROUP="floppy" - -# permissions for removable devices like cardreaders or sticks -KERNEL=="sd*", ATTRS{scsi_level}=="0", 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}="/lib/udev/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" - -# pty and tty legacy devices -KERNEL=="pty[a-z][a-z,0-9]*", NAME="legacy/%k", OPTIONS="last_rule" -KERNEL=="tty[a-z][a-z,0-9]*", NAME="legacy/%k", OPTIONS="last_rule" - -# md block devices -KERNEL=="md[0-9]*", NAME="md%n", SYMLINK+="md/%n" - -# device-mapper -KERNEL=="device-mapper", NAME="mapper/control" - -# floppy devices -KERNEL=="fd[0-9]*", NAME="fd%n", SYMLINK+="floppy/%n fd%nu1440 fd%nu720 fd%nh1200 fd%nu360", GROUP="floppy" - -# tty devices -SUBSYSTEM=="tty", GROUP="tty" -KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK+="%k" -KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="ttyS%n" -KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK+="%k" - -# vc devices -KERNEL=="vcs", NAME="vcc/0", OPTIONS="last_rule" -KERNEL=="vcs[0-9]*", NAME="vcc/%n", OPTIONS="last_rule" -KERNEL=="vcsa", NAME="vcc/a0", OPTIONS="last_rule" -KERNEL=="vcsa[0-9]*", NAME="vcc/a%n", OPTIONS="last_rule" -KERNEL=="ptmx", MODE="0666", OPTIONS="last_rule" -KERNEL=="tty", MODE="0666", OPTIONS="last_rule" - -# video devices -SUBSYSTEM=="video4linux", GROUP="video" -KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; A=$${K%%%%.*}; D=$${K#*.}; echo dvb/adapter$$A/$$D'", \ - NAME="%c", GROUP="video" -### xorg resets those permissions, adjust your xorg.conf! -KERNEL=="nvidia*", GROUP="video" -KERNEL=="card[0-9]*", NAME="dri/%k", GROUP="video" -KERNEL=="3dfx*", GROUP="video" - -# v4l devices -KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK+="%k", GROUP="video" -KERNEL=="video0", SYMLINK+="video" -KERNEL=="radio[0-9]*", NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video" -KERNEL=="radio0", SYMLINK+="radio" -KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK+="%k", GROUP="video" -KERNEL=="vbi0", SYMLINK+="vbi" -KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", SYMLINK+="%k", GROUP="video" -KERNEL=="vtx0", SYMLINK+="vtx" - -# i2c devices -KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK+="%k" - -# loop devices -KERNEL=="loop[0-9]*", NAME="loop/%n", SYMLINK+="%k" - -# ramdisks -KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k" - -# framebuffer devices -KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video" - -# misc -KERNEL=="rtc*", NAME="misc/%k", SYMLINK+="%k", GROUP="audio", MODE="0664" -KERNEL=="rtc0", SYMLINK+="rtc" -KERNEL=="nvram", NAME="misc/%k", SYMLINK+="%k", GROUP="kmem", MODE="0640" -KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k" GROUP="video" -KERNEL=="uinput", NAME="misc/%k", SYMLINK+="%k" -KERNEL=="random", MODE="0666" -KERNEL=="urandom", MODE="0666" -KERNEL=="mem", MODE="0640", GROUP="kmem" -KERNEL=="kmem", MODE="0640", GROUP="kmem" -KERNEL=="port", MODE="0640", GROUP="kmem" -KERNEL=="full", MODE="0666" -KERNEL=="null", MODE="0666" -KERNEL=="zero", MODE="0666" -KERNEL=="sgi_fetchop", MODE="0666" -KERNEL=="sonypi", MODE="0666" -KERNEL=="inotify", NAME="misc/%k", SYMLINK+="%k", MODE="0666" -KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", SYMLINK="%k" -KERNEL=="msr[0-9]*", NAME="cpu/%n/msr", SYMLINK="%k" - -# sound devices -# alsa devices -SUBSYSTEM=="sound", GROUP="audio" -KERNEL=="controlC[0-9]*", NAME="snd/%k" -KERNEL=="hw[CD0-9]*", NAME="snd/%k" -KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" -KERNEL=="midi[CD0-9]*", NAME="snd/%k" -KERNEL=="timer", NAME="snd/%k" -KERNEL=="seq", NAME="snd/%k" -# 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=="midi*", 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" - -# input devices -KERNEL=="mice", NAME="input/%k", MODE="0644" -KERNEL=="mouse*", NAME="input/%k", MODE="0644" -KERNEL=="event*", NAME="input/%k" -KERNEL=="js*", NAME="input/%k", MODE="0664" -KERNEL=="ts*", NAME="input/%k" -KERNEL=="uinput", NAME="input/%k" - -# USB devices -KERNEL=="hiddev*", NAME="usb/%k" -KERNEL=="auer*", NAME="usb/%k" -KERNEL=="legousbtower*", NAME="usb/%k", MODE="0666" -KERNEL=="dabusb*", NAME="usb/%k" -SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp" -SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="Palm Handheld*", SYMLINK+="pilot" -SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="palmOne Handheld*", SYMLINK+="pilot" -SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="Handspring Visor*", SYMLINK+="pilot" - -# printer devices -SUBSYSTEM=="printer", GROUP="lp" - -# 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" - -# CAPI devices -KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" -KERNEL=="capi*", NAME="capi/%n" - -# Network devices -KERNEL=="tun", NAME="net/%k", OPTIONS+="ignore_remove" -KERNEL=="ppp", OPTIONS+="ignore_remove" - -# IEEE1394 (firewire) devices -KERNEL=="raw1394", NAME="%k", GROUP="video" -KERNEL=="dv1394*", NAME="dv1394/%n", GROUP="video" -KERNEL=="video1394*", NAME="video1394/%n", GROUP="video" - -# raw devices -KERNEL=="raw[0-9]*", NAME="raw/%k" - -# kbd devices -KERNEL=="kbd", MODE="0664" - -# packet devices -KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="optical", MODE="0660" -KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="optical", MODE="0660" - -# usbfs-like device nodes, libusb device access -# for kernel 2.6.21 and below -SUBSYSTEM=="usb_device", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev};printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0664" -# starting from kernel 2.6.22 use this rule -SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664" -####################################### -# Permissions and Symlinks - end -####################################### - -####################################### -# Persistant block device stuff - begin -####################################### -# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name} -# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de> - -# needed like this!!! -ACTION!="add|change", GOTO="persistent_storage_end" -KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", IMPORT{program}="/lib/udev/scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" - -# type 8 devices are "Medium Changers" -KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="/lib/udev/scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -SUBSYSTEM!="block", GOTO="persistent_storage_end" - -# skip rules for inappropriate block devices -# don't add dm-*!!! -KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|md*", GOTO="persistent_storage_end" - -# never access non-cdrom removable ide devices, the drivers are causing event loops on open() -KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end" -KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end" - -# ignore partitions that span the entire disk -ATTR{whole_disk}=="*", GOTO="persistent_storage_end" - -# /sys/class/block will export this -ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk" -ENV{DEVTYPE}!="?*", ATTR{start}=="?*", ENV{DEVTYPE}="partition" - -# for partitions import parent information -ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" - -# by-id (hardware serial number) -KERNEL=="hd*[!0-9]", IMPORT{program}="/lib/udev/ata_id --export $tempnode" -KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" -KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" - -KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_SUBSYSTEMS}="ieee1394" -KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="/lib/udev/usb_id --export %p" -KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="/lib/udev/scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" -KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="/lib/udev/scsi_id --export --whitelisted --ignore-sysfs -s %p -d $tempnode", ENV{ID_BUS}="cciss" -KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" -KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - -# libata compat (links like hd*) -KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="/lib/udev/ata_id $tempnode", RESULT=="?*", ENV{ID_ATA_COMPAT}="$result", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}" -KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n" - -KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" -KERNEL=="mmcblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" - -# by-path (shortest physical path) -ENV{DEVTYPE}=="disk", IMPORT{program}="/lib/udev/path_id %p" -ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" -ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" -KERNEL=="st*", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" - -KERNEL=="sr*|st*", GOTO="persistent_storage_end" -KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end" - -# by-label/by-uuid (filesystem properties) -IMPORT{program}="/lib/udev/vol_id --export $tempnode" -ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - -# BIOS Enhanced Disk Device -ENV{DEVTYPE}=="disk", IMPORT{program}="/lib/udev/edd_id --export $tempnode" -ENV{DEVTYPE}=="disk", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}" -ENV{DEVTYPE}=="partition", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n" -LABEL="persistent_storage_end" - -# md links hook into "change" events, when the array becomes available -KERNEL!="md[0-9]*", GOTO="md_end" -ACTION!="add|change", GOTO="md_end" - -ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -IMPORT{program}="/lib/udev/vol_id --export $tempnode" -OPTIONS="link_priority=100" -ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" -LABEL="md_end" -# Persistant block device stuff - end -##################################### - -####################################### -# Persistant input stuff - begin -####################################### -SUBSYSTEM!="input", GOTO="persistent_input_end" -ACTION!="add", GOTO="persistent_input_end" -# ignore the mid-level drivers -KERNEL=="input[0-9]*", GOTO="persistent_input_end" - -# usb devices -SUBSYSTEMS=="usb", IMPORT{program}="/lib/udev/usb_id --export" -SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd" -SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse" - -# other devices -DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr" -DRIVERS=="atkbd", ENV{ID_CLASS}="kbd" -DRIVERS=="psmouse", ENV{ID_CLASS}="mouse" -ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir" -ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick" - -# fill empty serial number -ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" - -# by-id links, generic and for the event devices -KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" -KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" - - -# by-path links -IMPORT{program}="/lib/udev/path_id %p" -KERNEL=="mouse*|js*", ENV{ID_PATH}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" -KERNEL=="event*", ENV{ID_PATH}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}" - -LABEL="persistent_input_end" -##################################### -# Persistant input stuff - end -##################################### - -# run a command on remove events -ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" - -# debugging monitor -RUN+="socket:/org/kernel/udev/monitor" diff --git a/abs/core-testing/udev/usb-storage.rules b/abs/core-testing/udev/usb-storage.rules deleted file mode 100644 index a7e0726..0000000 --- a/abs/core-testing/udev/usb-storage.rules +++ /dev/null @@ -1,4 +0,0 @@ -SUBSYSTEMS=="usb", KERNEL=="sd[b-z]", NAME="%k", SYMLINK+="usb-%k", GROUP="users", OPTIONS="last_rule" -ACTION=="add", SUBSYSTEMS=="usb", KERNEL=="sd[b-z][0-9]", SYMLINK+="usb-%k", GROUP="users", NAME="%k" -ACTION=="add", SUBSYSTEMS=="usb", KERNEL=="sd[b-z][0-9]", RUN+="/etc/udev/scripts/mount-usb mount %k", OPTIONS="last_rule" -ACTION=="remove", SUBSYSTEMS=="block", RUN+="/etc/udev/scripts/mount-usb umount %k", OPTIONS="last_rule"# |