diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-04-26 00:41:38 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-04-26 00:41:38 +0200 |
commit | d323115c7b1a02244a52e298d83be8a390dbcc28 (patch) | |
tree | 7a45df0446def011131230fc077f6315f61569cd | |
parent | fb6331d8c177e608cf164fbebfb7f559f5ef067d (diff) | |
download | mkinitcpio-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
-rw-r--r-- | init | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -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 |