summaryrefslogtreecommitdiffstats
path: root/abs/core/klibc-udev/load-modules.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-10-23 18:17:40 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-10-23 18:19:39 (GMT)
commitadbcf19958300e9b6598990184c8815b945ba0ee (patch)
treef4283c850ac0ac202c17e78a637ee7ca8147621b /abs/core/klibc-udev/load-modules.sh
parent61a68250df10d29b624650948484898334ff22d0 (diff)
downloadlinhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.zip
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.gz
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.bz2
Removed old core and extra from repo. Renamed -testing to core/extra. This will setup the base for the testing branch.
Diffstat (limited to 'abs/core/klibc-udev/load-modules.sh')
-rwxr-xr-xabs/core/klibc-udev/load-modules.sh51
1 files changed, 0 insertions, 51 deletions
diff --git a/abs/core/klibc-udev/load-modules.sh b/abs/core/klibc-udev/load-modules.sh
deleted file mode 100755
index 3d52d6b..0000000
--- a/abs/core/klibc-udev/load-modules.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-# Implement blacklisting for udev-loaded modules
-# Includes module checking
-# - Aaron Griffin & Tobias Powalowski for Archlinux
-[ $# -ne 1 ] && exit 1
-
-MODPROBE="/sbin/modprobe"
-RESOLVEALIAS="/bin/resolve-modalias"
-USEBLACKLIST="--use-blacklist"
-REPLACE="/bin/replace"
-MODDEPS="/bin/moddeps"
-
-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="$(${REPLACE} ${disablemodules} ',')"
- fi
-fi
-
-# sanitize the module names
-BLACKLIST="$(${REPLACE} "${BLACKLIST}" '-' '_')"
-
-if [ -n "${BLACKLIST}" ] ; then
- # Try to find all modules for the alias
- mods="$($RESOLVEALIAS /lib/modules/$(uname -r)/modules.alias $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
- deps="$(${MODDEPS} ${mod})"
- [ $? -ne 0 ] && continue
- # 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 $1
-fi
-
-# vim: set et ts=4: