From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] Abort grub-install if prefix cannot be determined
Date: Thu, 24 Jul 2008 07:39:24 +0200 [thread overview]
Message-ID: <4888158C.1070506@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
grub-install does not check error return from
make_system_path_relative_to_its_root() fails.
BTW: Unlike the other scripts, grub-install does not 'set -e'. Is this
intentional or historic ?-)
Christian
2008-07-24 Christian Franke <franke@computer.org>
* util/i386/pc/grub-install.in: If `--debug' is specified,
pass `--verbose' to grub-setup.
Abort script if make_system_path_relative_to_its_root() fails.
[-- Attachment #2: grub-install-prefix.patch --]
[-- Type: text/x-diff, Size: 1240 bytes --]
diff --git a/util/i386/pc/grub-install.in b/util/i386/pc/grub-install.in
index 1b2bccb..d7966d5 100644
--- a/util/i386/pc/grub-install.in
+++ b/util/i386/pc/grub-install.in
@@ -127,8 +127,10 @@ if test "x$install_device" = x; then
fi
# If the debugging feature is enabled, print commands.
+setup_verbose=
if test $debug = yes; then
set -x
+ setup_verbose="--verbose"
fi
# Initialize these directories here, since ROOTDIR was initialized.
@@ -240,12 +242,12 @@ fi
# The order in this list is critical. Be careful when modifying it.
modules="$modules $fs_module $partmap_module biosdisk $devabstraction_module"
-$grub_mkimage --output=${grubdir}/core.img \
- --prefix=${prefix_drive}`make_system_path_relative_to_its_root ${grubdir}`/ \
- $modules || exit 1
+grub_prefix="${prefix_drive}`make_system_path_relative_to_its_root ${grubdir}`" || exit 1
+
+$grub_mkimage --output=${grubdir}/core.img --prefix=${grub_prefix}/ $modules || exit 1
# Now perform the installation.
-$grub_setup --directory=${grubdir} --device-map=${device_map} \
+$grub_setup ${setup_verbose} --directory=${grubdir} --device-map=${device_map} \
${install_device} || exit 1
# Prompt the user to check if the device map is correct.
next reply other threads:[~2008-07-24 5:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 5:39 Christian Franke [this message]
2008-07-24 19:04 ` [PATCH] Abort grub-install if prefix cannot be determined Christian Franke
2008-07-25 20:37 ` Robert Millan
2008-07-25 21:49 ` Pavel Roskin
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=4888158C.1070506@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.