From: Christian Franke <Christian.Franke@t-online.de>
To: grub-devel@gnu.org
Subject: [PATCH] Add grub-mkrescue --exclude option
Date: Tue, 20 Nov 2007 20:37:50 +0100 [thread overview]
Message-ID: <4743378E.4070204@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
This adds an option to exclude specific modules from the rescue image.
Christian
2007-11-20 Christian Franke <franke@computer.org>
* util/i386/pc/grub-mkrescue.in: Add option --exclude.
[-- Attachment #2: grub2-mkrescue-exclude.patch --]
[-- Type: text/x-patch, Size: 1304 bytes --]
--- grub2.orig/util/i386/pc/grub-mkrescue.in 2007-07-22 01:32:32.000000000 +0200
+++ grub2/util/i386/pc/grub-mkrescue.in 2007-11-19 23:26:53.625000000 +0100
@@ -42,6 +42,7 @@
-h, --help print this message and exit
-v, --version print the version information and exit
--modules=MODULES pre-load specified modules MODULES
+ --exclude=MODULES don't pre-load specified modules MODULES
--pkglibdir=DIR use images from directory DIR instead of ${pkglibdir}
--grub-mkimage=FILE use FILE as grub-mkimage
--image-type=TYPE select floppy or cdrom (default)
@@ -67,6 +68,8 @@
exit 0 ;;
--modules=*)
modules=`echo "$option" | sed 's/--modules=//'` ;;
+ --exclude=*)
+ exclude=`echo "$option" | sed 's/--exclude=//'` ;;
--pkglibdir=*)
input_dir=`echo "$option" | sed 's/--pkglibdir=//'` ;;
--grub-mkimage=*)
@@ -103,6 +106,18 @@
modules=`cd ${input_dir}/ && ls *.mod`
fi
+if [ "x${exclude}" != "x" ] ; then
+ all_modules="${modules}"
+ modules=
+ for m in ${all_modules} ; do
+ inc=t
+ for e in ${exclude} ; do
+ [ "$e" == "$m" ] && { inc=f; break; }
+ done
+ [ $inc == t ] && modules="$modules $m"
+ done
+fi
+
if [ "x${image_type}" = "xfloppy" ] ; then
floppy_image=${output_image}
else
next reply other threads:[~2007-11-20 19:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 19:37 Christian Franke [this message]
2007-12-06 12:04 ` [PATCH] Add grub-mkrescue --exclude option Robert Millan
2007-12-06 12:34 ` Christian Franke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4743378E.4070204@t-online.de \
--to=christian.franke@t-online.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.