--- mkinitrd-3.0.3.orig/mkinitrd 2007-03-29 19:51:08 +0300 +++ mkinitrd-3.0.3.orig/mkinitrd 2007-05-17 03:23:16 +0300 @@ -1260,7 +1260,7 @@ fi local m - for m in $MODULES; do + for m in $MODULES $NOLOAD_MODULES; do Install "$m" "$MNTDIR/$m" || Fatal "Failed to install $m module." m="$MNTDIR/$m" @@ -1469,6 +1469,7 @@ --omit-scsi-modules do not load any SCSI modules. --omit-ide-modules do not load any IDE modules. --omit-raid-modules do not load any raid modules. +--noload MODULENAME|@listfile add MODULENAME to initramfs. --pause pause for manual initrd editing. --nocompress do not compress initrd image. --nobootsplash do not add bootsplash to the initrd image. @@ -1488,7 +1489,7 @@ [ -n "$1" ] && Exit "$1" || Exit } -TEMP=`getopt -n "$PROG" -o a:fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,with-raid,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after:,type:,add: -- "$@"` || Usage 1 +TEMP=`getopt -n "$PROG" -o a:fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,with-raid,pause,image-version,nocompress,nobootsplash,strict,fstab:,place:,noload:,before:,preload:,with:,after:,type:,add: -- "$@"` || Usage 1 eval set -- "$TEMP" img_vers= @@ -1511,6 +1512,22 @@ FSTAB_FILE=$1 shift ;; + --place|--noload) + shift + LISTFILE=`echo "$1" | sed 's/^@//'` + if [ "$1" != "$LISTFILE" ]; then + if [ -f "$LISTFILE" ]; then + for m in `grep -v '^[[:blank:]]*#' "$LISTFILE"` ; do + NOLOAD_MODNAMES="$NOLOAD_MODNAMES $m" + done + else + echo "warning: file $LISTFILE not exist!" >&2 + fi + else + NOLOAD_MODNAMES="$NOLOAD_MODNAMES $1" + fi + shift + ;; --before|--preload) shift PRELOAD_MODNAMES="$PRELOAD_MODNAMES $1" @@ -1660,6 +1677,9 @@ Fatal "Adding extra files supported only for initramfs images." ### Begin module lookup. +FindModules $NOLOAD_MODNAMES +NOLOAD_MODULES=$MODULES +MODULES= FindModules $PRELOAD_MODNAMES @@ -1677,12 +1697,12 @@ ### End module lookup. -if [ -n "$ifneeded" -a -z "$MODULES" ]; then +if [ -n "$ifneeded" -a -z "$MODULES" -a -z "$NOLOAD_MODULES" ]; then Verbose "No modules are needed - not building initrd image." exit 0 fi -Verbose "Using modules: $MODULES" +Verbose "Using modules: $MODULES $NOLOAD_MODULES" PrepareBootSplashData --- mkinitrd-3.0.3.orig/mkinitrd.8 2007-03-29 19:51:08 +0300 +++ mkinitrd-3.0.3.orig/mkinitrd.8 2007-05-17 02:57:44 +0300 @@ -15,6 +15,8 @@ .IR type ] .RB [ \-\-fstab .IR filename ] +.RB [ \-\-noload +.IR modulename ] .RB [ \-\-preload .IR modulename ] .RB [ \-\-with @@ -90,6 +92,14 @@ is used. . .TP +.BI \-\-noload= module +Add the modules +.I module +in the initial ramdisk image. +.IR /etc/modules.conf . +This option may be used as many times as necessary. +. +.TP .BI \-\-preload= module Load the module .I module