From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IuYyk-0000ve-Nl for mharc-grub-devel@gnu.org; Tue, 20 Nov 2007 14:41:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IuYyi-0000v0-NM for grub-devel@gnu.org; Tue, 20 Nov 2007 14:41:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IuYyg-0000uD-Sg for grub-devel@gnu.org; Tue, 20 Nov 2007 14:41:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuYyg-0000u3-LS for grub-devel@gnu.org; Tue, 20 Nov 2007 14:41:46 -0500 Received: from mailout01.sul.t-online.de ([194.25.134.80] helo=mailout01.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IuYyf-0007su-Iw for grub-devel@gnu.org; Tue, 20 Nov 2007 14:41:45 -0500 Received: from fwd29.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1IuYyc-0005RV-02; Tue, 20 Nov 2007 20:41:42 +0100 Received: from [10.3.2.2] (Tz3W54ZvghGTJJ-ecpr0p-ufhe7W8B+WEDt6W2eRkAaBOAkkL11K7OxU8SJFmcOZZl@[217.235.234.104]) by fwd29.aul.t-online.de with esmtp id 1IuYuq-22SIRk0; Tue, 20 Nov 2007 20:37:48 +0100 Message-ID: <4743378E.4070204@t-online.de> Date: Tue, 20 Nov 2007 20:37:50 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: multipart/mixed; boundary="------------020607050309040206080200" X-ID: Tz3W54ZvghGTJJ-ecpr0p-ufhe7W8B+WEDt6W2eRkAaBOAkkL11K7OxU8SJFmcOZZl X-TOI-MSGID: 4a0d3d0a-0749-46bb-b91a-6273faae84ea X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Add grub-mkrescue --exclude option X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2007 19:41:49 -0000 This is a multi-part message in MIME format. --------------020607050309040206080200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This adds an option to exclude specific modules from the rescue image. Christian 2007-11-20 Christian Franke * util/i386/pc/grub-mkrescue.in: Add option --exclude. --------------020607050309040206080200 Content-Type: text/x-patch; name="grub2-mkrescue-exclude.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="grub2-mkrescue-exclude.patch" --- 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 --------------020607050309040206080200--