summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-04-26 00:41:38 +0200
committerAaron Griffin <aaron@archlinux.org>2006-04-26 00:41:38 +0200
commitd323115c7b1a02244a52e298d83be8a390dbcc28 (patch)
tree7a45df0446def011131230fc077f6315f61569cd /init
parentfb6331d8c177e608cf164fbebfb7f559f5ef067d (diff)
downloadmkinitcpio-d323115c7b1a02244a52e298d83be8a390dbcc28.tar.gz
mkinitcpio-d323115c7b1a02244a52e298d83be8a390dbcc28.tar.xz
Add disablemodules= kernel param
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@18 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'init')
-rw-r--r--init22
1 files changed, 16 insertions, 6 deletions
diff --git a/init b/init
index a8f7b34..3afc2aa 100644
--- a/init
+++ b/init
@@ -17,25 +17,35 @@ for cmd in $CMDLINE; do
esac
done
+OLDIFS=$IFS
+IFS=,
if [ "x${disablehooks}" != "x" ]; then
- OLDIFS=$IFS
- IFS=,
for d in ${disablehooks}; do
- export "${d}=disabled"
+ export "hook_${d}=disabled"
done
- IFS=$OLDIFS
fi
+if [ "x${disablemodules}" != "x" ]; then
+ for d in ${disablemodules}; do
+ export "mod_${d}=disabled"
+ done
+fi
+IFS=$OLDIFS
+
. /config
for m in $MODULES; do
- /bin/modprobe -q $m > /dev/null 2>&1
+ TST=""
+ eval "TST=\$mod_${h}"
+ if [ "${TST}" != "disabled" ]; then
+ /bin/modprobe -q $m > /dev/null 2>&1
+ fi
done
if [ -e "/hooks" ]; then
for h in $HOOKS; do
TST=""
- eval "TST=\$${h}"
+ eval "TST=\$hook_${h}"
if [ "${TST}" != "disabled" ]; then
run_hook () { msg "$h: no run function defined"; }
if [ -e "/hooks/$h" ]; then