diff options
author | maximilian attems <maks@debian.org> | 2007-06-20 21:14:49 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2007-06-20 21:14:49 +0200 |
commit | ea411290cf026aa07d8cf4c2a0f8154e0dbde977 (patch) | |
tree | 84564427918199cf007b0a52654c7624ad76f8f0 /mkinitramfs | |
parent | 087dc49f30e7d94db10c0f0cd89020a56a04a918 (diff) | |
download | initramfs-tools-ea411290cf026aa07d8cf4c2a0f8154e0dbde977.tar.gz initramfs-tools-ea411290cf026aa07d8cf4c2a0f8154e0dbde977.zip |
mkinitramfs: on wrong MODULES setting fallback to most
this setting is known to be bootable,
currently we would just create an unbootable initramfs. *bad*
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-x | mkinitramfs | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/mkinitramfs b/mkinitramfs index a2e643c..d8a24fe 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -181,18 +181,27 @@ for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do fi done -if [ "${MODULES}" = "dep" ]; then +# MODULES=most is default +case "${MODULES}" in +dep) dep_add_modules -fi - -if [ "${MODULES}" = "most" ]; then + ;; +most) auto_add_modules -fi - -if [ "${MODULES}" = "netboot" ]; then + ;; +netboot) auto_add_modules base auto_add_modules net -fi + ;; +list) + # nothing to add + ;; +*) + echo "mkinitramfs: Warning unsupported MODULES setting: ${MODULES}." + echo "mkinitramfs: Falling back to MODULES=most." + auto_add_modules + ;; +esac # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. |