Index: trunk/PKGBUILD =================================================================== --- trunk/PKGBUILD (Revision 69613) +++ trunk/PKGBUILD (Arbeitskopie) @@ -15,18 +15,17 @@ 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 cdsymlinks.sh root-link.sh + 81-arch.rules cdsymlinks.sh root-link.sh arch-udev-rules.patch ignore-remove.sh firmware-loader-fix-missing-firmware.patch) md5sums=('aeae0e6273dcbec246c3c1b9868ebed1' - '6393ee81993f8b9beb776ca904005864' - 'f91fddc67609b45b244a624977c4247b' + '09be8d4b89fe49f64aff593f9b4e61bc' '2e808ee78d237c478b57af2a68d43769' '2d6dc6842464f107bccc68cd505a6c31' - '22c1f059cdeddaac5e7fe33b007da6a3' + 'aedd4f5d9292b9f0c932ed2782a7523b' '35fa97500243a79b2370fa4684828e69' 'ec1fa2ecaff2e8efc611cb70568630ad') - + build() { cd $srcdir/$pkgname-$pkgver # The new firmware loader has a bug where modprobe will hang 60 seconds when a @@ -58,8 +57,6 @@ 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 cdsymlinks.sh install -D -m755 $srcdir/cdsymlinks.sh $pkgdir/lib/udev/cdsymlinks.sh # install root-link.sh @@ -95,6 +92,9 @@ 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.conf done + + # create symlink for on-the-fly blacklist + ln -sf /dev/.blacklist.sys.conf $pkgdir/etc/modprobe.d/blacklist.sys.conf # create static devices in /lib/udev/devices/ mkdir ${pkgdir}/lib/udev/devices Index: trunk/arch-udev-rules.patch =================================================================== --- trunk/arch-udev-rules.patch (Revision 69613) +++ trunk/arch-udev-rules.patch (Arbeitskopie) @@ -30,29 +30,4 @@ # do not delete static device nodes -ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove" -ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" -+ACTION=="remove", PROGRAM="ignore-remove.sh %r", OPTIONS+="ignore_remove" -diff -Nur rules.d/80-drivers.rules rules.d.arch/80-drivers.rules ---- rules.d/80-drivers.rules 2009-03-07 22:22:48.200242883 +0100 -+++ rules.d.arch/80-drivers.rules 2009-03-07 22:22:54.757744454 +0100 -@@ -2,13 +2,14 @@ - - ACTION!="add", GOTO="drivers_end" - --DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -b $env{MODALIAS}" --SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -b tifm_sd" --SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe -b tifm_ms" --SUBSYSTEM=="memstick", RUN+="/sbin/modprobe -b --all ms_block mspro_block" --SUBSYSTEM=="i2o", RUN+="/sbin/modprobe -b i2o_block" --SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -b sg" --SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe -b 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=="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" - ++ACTION=="remove", PROGRAM="ignore-remove.sh %r", OPTIONS+="ignore_remove" Index: trunk/81-arch.rules =================================================================== --- trunk/81-arch.rules (Revision 69613) +++ trunk/81-arch.rules (Arbeitskopie) @@ -29,20 +29,20 @@ ACTION!="add", GOTO="drivers_end" # 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" +SUBSYSTEM=="sound", RUN+="modprobe snd-pcm-oss" +SUBSYSTEM=="sound", RUN+="modprobe 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}=="*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}=="PNP0800", RUN+="modprobe -b pcspkr" +SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP051[01]*", RUN+="modprobe -b irtty-sir" +SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNPb02f", RUN+="modprobe -b analog" # PARPORT addon modules -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh lp" -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh ppdev" +SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="modprobe -b lp" +SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="modprobe -b ppdev" # fix ide cdrom detection on old proliant servers -SUBSYSTEM=="pci", ENV{MODALIAS}=="pci:v00000E11d00000001sv00000000sd00000000bc06sc02i00", RUN+="/lib/udev/load-modules.sh ide-generic" +SUBSYSTEM=="pci", ENV{MODALIAS}=="pci:v00000E11d00000001sv00000000sd00000000bc06sc02i00", RUN+="modprobe -b ide-generic" LABEL="drivers_end" ##################################### Index: trunk/load-modules.sh =================================================================== --- trunk/load-modules.sh (Revision 69613) +++ trunk/load-modules.sh (Arbeitskopie) @@ -1,80 +0,0 @@ -#!/bin/bash -# Implement blacklisting for udev-loaded modules - -[ $# -ne 1 ] && exit 1 - -. /etc/rc.conf - -# grab modules from rc.conf -BLACKLIST="${MOD_BLACKLIST[@]}" -MODPROBE="/sbin/modprobe" -LOGGER="/usr/bin/logger" -RESOLVEALIAS="${MODPROBE} --resolve-alias" -USEBLACKLIST="--use-blacklist" - -if [ -f /proc/cmdline ]; then - for cmd in $(cat /proc/cmdline); do - case $cmd in - disablemodules=*) eval $cmd ;; - load_modules=off) exit ;; - esac - done - #parse cmdline entries of the form "disablemodules=x,y,z" - if [ -n "$disablemodules" ]; then - BLACKLIST="$BLACKLIST $(echo $disablemodules | sed 's|,| |g')" - fi -fi - -#MODULES entries in rc.conf that begin with ! are blacklisted -for mod in ${MODULES[@]}; do - if [ "${mod}" != "${mod#!}" ]; then - BLACKLIST="$BLACKLIST ${mod#!}" - fi -done - -if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then - if [ -n "${BLACKLIST}" ]; then - # If an alias name is on the blacklist, load no modules for this device - if echo "${BLACKLIST}" | /bin/grep -q -e " $1 " -e "^$1 " -e " $1\$"; then - $LOGGER -p info -t "$(basename $0)" "Not loading module alias '$1' because it is blacklisted" - exit - fi - #sanitize the blacklist - BLACKLIST="$(echo "$BLACKLIST" | sed -e 's|-|_|g')" - # Try to find all modules for the alias - 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 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})" - [ $? -ne 0 ] && continue - - #sanitize the module names - deps="$(echo "$deps" | sed \ - -e "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" \ - -e 's|-|_|g')" - - # If the module or any of its dependencies is blacklisted, don't load it - for dep in $deps; do - if echo "${BLACKLIST}" | /bin/grep -q -e " ${dep} " -e "^${dep} " -e " ${dep}\$"; then - if [ "${dep}" = "${mod}" ]; then - $LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because it is blacklisted" - else - $LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because its dependency '${dep}' is blacklisted" - fi - continue 2 - fi - done - # modprobe usually uses the "blacklist" statements from modprobe.conf only to blacklist all aliases - # of a module, but not the module itself. We use --use-blacklist here so that modprobe also blacklists - # module names if we resolved alias names manually above - $MODPROBE $USEBLACKLIST ${mod} - done - else - $MODPROBE $USEBLACKLIST $1 - fi -fi -# vim: set et ts=4: