diff options
author | Thomas Bächler <thomas@archlinux.org> | 2011-06-02 16:26:58 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2011-06-02 16:26:58 +0200 |
commit | 22bfb696d662c708280aa674f718bd7277e72630 (patch) | |
tree | 7de0ad39afa3bf90460e5b7e07a6d194c3c9bd0e | |
parent | 5d1f76ea7db5013c50fda3ac817af4348e338faa (diff) | |
download | mkinitcpio-22bfb696d662c708280aa674f718bd7277e72630.tar.gz mkinitcpio-22bfb696d662c708280aa674f718bd7277e72630.tar.xz |
Remove load-modules.sh. Requires the udev 171-2 package.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | install/udev | 1 | ||||
-rwxr-xr-x | load-modules.sh | 56 |
3 files changed, 0 insertions, 59 deletions
@@ -22,7 +22,6 @@ install: all install -D -m755 init ${DESTDIR}/lib/initcpio/init install -D -m755 init_functions ${DESTDIR}/lib/initcpio/init_functions install -D -m644 functions ${DESTDIR}/lib/initcpio/functions - install -D -m755 load-modules.sh ${DESTDIR}/lib/initcpio/udev/load-modules.sh install -D -m644 01-memdisk.rules ${DESTDIR}/lib/initcpio/udev/01-memdisk.rules install -d ${DESTDIR}/lib/initcpio/hooks @@ -57,7 +56,6 @@ TARBALL_FILES = \ init \ init_functions \ install \ - load-modules.sh \ 01-memdisk.rules \ mkinitcpio \ mkinitcpio.conf \ diff --git a/install/udev b/install/udev index e87fce9..33a13cc 100644 --- a/install/udev +++ b/install/udev @@ -14,7 +14,6 @@ install () for tool in firmware ata_id path_id scsi_id usb_id; do add_file /lib/udev/${tool} done - add_file /lib/initcpio/udev/load-modules.sh /lib/udev/load-modules.sh } help () diff --git a/load-modules.sh b/load-modules.sh deleted file mode 100755 index 1824e5e..0000000 --- a/load-modules.sh +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh -# Implement blacklisting for udev-loaded modules -# Includes module checking -# - Aaron Griffin, Tobias Powalowski & Thomas Bächler for Arch Linux -[ $# -ne 1 ] && exit 1 - -MODPROBE="/sbin/modprobe" -RESOLVEALIAS="${MODPROBE} --resolve-alias" -USEBLACKLIST="--use-blacklist" -SED="/bin/sed" - -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="$(echo "${disablemodules}" | ${SED} 's|,| |g')" - fi -fi - -# sanitize the module names -BLACKLIST="$(echo "${BLACKLIST}" | ${SED} 's|-|_|g')" - -if [ -n "${BLACKLIST}" ] ; then - # 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}" ] && exit - 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 - for blackmod in ${BLACKLIST}; do - [ "${blackmod}" = "${dep}" ] && continue 3 - done - done - $MODPROBE $USEBLACKLIST ${mod} - done -else - $MODPROBE $USEBLACKLIST $1 -fi - -# vim: set et ts=4: |