[arch-commits] CVS update of core/base/udev (5 files)
Aaron Griffin
aaron at archlinux.org
Thu Feb 21 06:29:54 UTC 2008
Date: Thursday, February 21, 2008 @ 01:29:54
Author: aaron
Path: /home/cvs-core/core/base/udev
Added: 00-load-blacklist.rules (1.1) mod-blacklist.sh (1.1)
Modified: PKGBUILD (1.152 -> 1.153) load-modules.sh (1.9 -> 1.10)
udev.rules (1.92 -> 1.93)
upgpkg: udev 118-2
FS#8702 - Fix persistant input devices
FS#8878 - Attempted speed up of load-modules.sh
FS#8591 - Fix loading of RTC devices
-------------------------+
00-load-blacklist.rules | 1
PKGBUILD | 41 +++++++++++++------------------
load-modules.sh | 60 +++++++++++++++-------------------------------
mod-blacklist.sh | 47 ++++++++++++++++++++++++++++++++++++
udev.rules | 9 +++---
5 files changed, 90 insertions(+), 68 deletions(-)
Index: core/base/udev/00-load-blacklist.rules
diff -u /dev/null core/base/udev/00-load-blacklist.rules:1.1
--- /dev/null Thu Feb 21 01:29:54 2008
+++ core/base/udev/00-load-blacklist.rules Thu Feb 21 01:29:54 2008
@@ -0,0 +1 @@
+IMPORT{program} = "/lib/udev/mod-blacklist.sh"
Index: core/base/udev/PKGBUILD
diff -u core/base/udev/PKGBUILD:1.152 core/base/udev/PKGBUILD:1.153
--- core/base/udev/PKGBUILD:1.152 Thu Feb 21 00:10:27 2008
+++ core/base/udev/PKGBUILD Thu Feb 21 01:29:54 2008
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD,v 1.152 2008/02/21 05:10:27 dan Exp $
+# $Id: PKGBUILD,v 1.153 2008/02/21 06:29:54 aaron Exp $
# Maintainer: ???
pkgname=udev
pkgver=118
-pkgrel=1
+pkgrel=2
pkgdesc="The userspace dev tools (udev)"
arch=(i686 x86_64)
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
@@ -17,20 +17,15 @@
conflicts=('pcmcia-cs' 'hotplug')
replaces=('devfsd')
options=(!makeflags)
-source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2 \
- migrate-udev
- udev.rules
- start_udev
- load-modules.sh
- cdrom-rules.patch
- cdsymlinks.sh
- root-link.sh
- readme-udev-arch.txt)
+source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2
+ migrate-udev udev.rules 00-load-blacklist.rules load-modules.sh mod-blacklist.sh
+ cdrom-rules.patch cdsymlinks.sh root-link.sh readme-udev-arch.txt)
md5sums=('39ab2404464c7026c65eb878827192b9'
'49434a593918c822077bc3af765f1aff'
- 'e3ce87c990b1ed410a368dc7ea4c7f2f'
- 'a68a519d1ed8cbbd2f45c23eb32ea218'
- '7fde690532937da756fa26e8f9757590'
+ 'd6777d650a6642d44539042bd3d9a456'
+ '65de8f29b853f4644fcc1c3ed3dd9938'
+ 'edfd8b53af8107c7c4a01490c37b16b4'
+ '89274af2ac493b67883112bfb16045ee'
'12d3ab1283c56beb903afcab11789037'
'8424b78e9dd772e75b4ef90814807815'
'2d6dc6842464f107bccc68cd505a6c31'
@@ -44,18 +39,18 @@
# remove udev default files
rm -f $startdir/pkg/etc/udev/rules.d/{05-udev-early.rules,50-udev-default.rules,60-persistent-storage.rules,61-persistent-storage-edd.rules,60-persistent-input.rules,80-drivers.rules,95-udev-late.rules}
install -D -m755 extras/path_id/path_id $startdir/pkg/sbin/path_id
- install -D -m755 ../migrate-udev $startdir/pkg/sbin/migrate-udev
- install -D -m644 ../udev.rules $startdir/pkg/etc/udev/rules.d/udev.rules
- # install start_udev script
- install -D -m755 $startdir/src/start_udev $startdir/pkg/etc/start_udev
- # install load-modules.sh
- install -D -m 755 $startdir/src/load-modules.sh $startdir/pkg/lib/udev/load-modules.sh
+ install -D -m755 $startdir/src/migrate-udev $startdir/pkg/sbin/migrate-udev
+ install -D -m644 $startdir/src/udev.rules $startdir/pkg/etc/udev/rules.d/udev.rules
+ # install out module loadintg subsystem
+ install -D -m755 $startdir/src/load-modules.sh $startdir/pkg/lib/udev/load-modules.sh
+ install -D -m755 $startdir/src/mod-blacklist.sh $startdir/pkg/lib/udev/mod-blacklist.sh
+ install -D -m644 $startdir/src/00-load-blacklist.rules $startdir/pkg/etc/udev/rules.d/00-load-blacklist.rules
# install cdsymlinks.sh
- install -D -m 755 $startdir/src/cdsymlinks.sh $startdir/pkg/lib/udev/cdsymlinks.sh
+ install -D -m755 $startdir/src/cdsymlinks.sh $startdir/pkg/lib/udev/cdsymlinks.sh
# install root-link.sh
- install -D -m 755 $startdir/src/root-link.sh $startdir/pkg/lib/udev/root-link.sh
+ install -D -m755 $startdir/src/root-link.sh $startdir/pkg/lib/udev/root-link.sh
# install instructions
- install -D -m 644 $startdir/src/readme-udev-arch.txt $startdir/pkg/etc/udev/readme-udev-arch.txt
+ install -D -m644 $startdir/src/readme-udev-arch.txt $startdir/pkg/etc/udev/readme-udev-arch.txt
# add devices dir
mkdir $startdir/pkg/lib/udev/devices
# disable error loggin to prevent startup failures printed to vc on boot
Index: core/base/udev/load-modules.sh
diff -u core/base/udev/load-modules.sh:1.9 core/base/udev/load-modules.sh:1.10
--- core/base/udev/load-modules.sh:1.9 Thu Oct 18 05:21:48 2007
+++ core/base/udev/load-modules.sh Thu Feb 21 01:29:54 2008
@@ -1,52 +1,32 @@
#! /bin/sh
# Implement blacklisting for udev-loaded modules
-# Includes module checking
-# - Aaron Griffin & Tobias Powalowski for Archlinux
-. /etc/rc.conf
[ $# -ne 1 ] && exit 1
-if [ -f /proc/cmdline ]; then
- for cmd in $(cat /proc/cmdline); do
- case $cmd in
- *=*) eval $cmd ;;
- esac
- done
-fi
-
-# blacklist framebuffer modules
-for x in $(echo /lib/modules/$(uname -r)/kernel/drivers/video/*/*fb*); do
- BLACKLIST="$BLACKLIST $(basename $x .ko)"
-done
-for x in $(echo /lib/modules/$(uname -r)/kernel/drivers/video/*fb*); do
- BLACKLIST="$BLACKLIST $(basename $x .ko)"
-done
-# get the real names from modaliases
-i="$(/sbin/modprobe -i --show-depends $1 | sed "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" | sed 's|-|_|g')"
-# get blacklistet modules
-k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | sed 's|-|_|g')"
-j="$(echo ${MODULES[@]} | sed 's|-|_|g')"
-#add disabled MODULES (!) to blacklist - much requested feature
-for m in ${j}; do
- [ "$m" != "${m#!}" ] && k="${k} ${m#!}"
-done
-# add disablemodules= from commandline to blacklist
-k="${k} $(echo ${disablemodules} | sed 's|-|_|g' | sed 's|,| |g')"
+if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then
+ if [ -n "$BLACKLIST" ]; then
+ depmods="$(/sbin/modprobe -i --show-depends $1)"
+ if [ $? -ne 0 ]; then
+ /usr/bin/logger -p info "cannot find module $1"
+ exit 1
+ fi
+ #sanitize our module names
+ depmods="$(echo $depmods \
+ | sed "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" \
+ | sed 's|-|_|g')"
-if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ] && [ "$load_modules" != "off" ]; then
- if [ "${k}" != "" ]; then
- for n in ${i}; do
- if echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
- /usr/bin/logger -p info \
- "udev load-modules: $i is blacklisted"
- exit 1
- fi
- done
+ for mod in $depmods; do
+ if echo $BLACKLIST | /bin/grep "\<$mod\>" 2>&1 >/dev/null; then
+ /usr/bin/logger -p info "udev load-modules: $1 is blacklisted"
+ exit 1
+ fi
+ done
fi
/sbin/modprobe $1
else
- /usr/bin/logger -p info \
- "udev load-modules: autoloading is disabled, not loading $i"
+ #/usr/bin/logger -p info \
+ echo \
+ "udev load-modules: autoloading is disabled, not loading $1"
fi
# vim: set et ts=4:
Index: core/base/udev/mod-blacklist.sh
diff -u /dev/null core/base/udev/mod-blacklist.sh:1.1
--- /dev/null Thu Feb 21 01:29:54 2008
+++ core/base/udev/mod-blacklist.sh Thu Feb 21 01:29:54 2008
@@ -0,0 +1,47 @@
+#! /bin/bash
+# Export a combined blacklist of all modules
+# for use by the load-modules script
+#
+# NOTE: we only need bash because of rc.conf, but this
+# is a one-time use script, so we're good
+
+. /etc/rc.conf
+
+# grab modules from rc.conf
+BLACKLIST="${MOD_BLACKLIST[@]}"
+
+if [ -f /proc/cmdline ]; then
+ for cmd in $(cat /proc/cmdline); do
+ case $cmd in
+ *=*) eval $cmd ;;
+ esac
+ done
+ #parse cmdline entries of the form "disablemodules=x,y,z"
+ if [ -n "$disablemodules" ]; then
+ BLACKLIST="$BLACKLIST $(echo $disablemodules | sed 's|,| |g')"
+ fi
+ if [ "$load_modules" == "off" ]; then
+ MOD_AUTOLOAD="no"
+ fi
+fi
+
+# blacklist framebuffer modules
+DRIVER_DIR="/lib/modules/$(uname -r)/kernel/drivers/"
+for x in $DRIVER_DIR/video/*/*fb*; do
+ BLACKLIST="$BLACKLIST $(basename $x .ko)"
+done
+for x in $DRIVER_DIR/video/*fb*; do
+ BLACKLIST="$BLACKLIST $(basename $x .ko)"
+done
+
+#MODULES entries in rc.conf that begin with ! are blacklisted
+for mod in ${MODULES[@]}; do
+ if [ "${mod}" != "${mod#!}" ]; then
+ BLACKLIST="$BLACKLIST ${mod#!}"
+ fi
+done
+
+echo "MOD_AUTOLOAD=\"$MOD_AUTOLOAD\""
+echo "BLACKLIST=\"$BLACKLIST\""
+
+# vim: set et ts=4:
Index: core/base/udev/udev.rules
diff -u core/base/udev/udev.rules:1.92 core/base/udev/udev.rules:1.93
--- core/base/udev/udev.rules:1.92 Mon Oct 15 13:55:07 2007
+++ core/base/udev/udev.rules Thu Feb 21 01:29:54 2008
@@ -77,9 +77,7 @@
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_dev"
-ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0b00", RUN+="/lib/udev/load-modules.sh rtc_proc"
-ACTION=="add", SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0b00", RUN+="/lib/udev/load-modules.sh rtc_sysfs"
+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"
@@ -434,8 +432,9 @@
ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
# by-id links, generic and for the event devices
-KERNEL=="mouse*|js*", ENV{ID_SUBSYSTEMS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}-$env{ID_CLASS}"
-KERNEL=="event*", ENV{ID_SUBSYSTEMS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
+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"
More information about the arch-commits
mailing list