Add Pavel Roskin's improvements to grub-install.in.
This commit is contained in:
parent
bbc286b007
commit
1675300153
2 changed files with 17 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2000-05-29 Pavel Roskin <pavel_roskin@geocities.com>
|
||||||
|
|
||||||
|
* util/grub-install.in: Fix a typo that prevented error messages
|
||||||
|
from appearing.
|
||||||
|
Copy and remove files individually and exit with an error as
|
||||||
|
soon as it fails.
|
||||||
|
Show $log_file if --debug was given on the command line.
|
||||||
|
|
||||||
2000-04-19 Gordon Matzigkeit <gord@fig.org>
|
2000-04-19 Gordon Matzigkeit <gord@fig.org>
|
||||||
|
|
||||||
* stage2/cmdline.c (enter_cmdline): Don't give errors on empty
|
* stage2/cmdline.c (enter_cmdline): Don't give errors on empty
|
||||||
|
|
|
@ -240,7 +240,7 @@ grubdir_device=`df ${grubdir} | grep /dev/ \
|
||||||
| sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
|
| sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
|
||||||
if test "x$grubdir_device" != "x$root_device"; then
|
if test "x$grubdir_device" != "x$root_device"; then
|
||||||
# For now, cannot deal with this situation.
|
# For now, cannot deal with this situation.
|
||||||
cat <<EOF 1&>2
|
cat <<EOF 1>&2
|
||||||
You must set the root directory by the option --root-directory, because
|
You must set the root directory by the option --root-directory, because
|
||||||
$grubdir does not exist in the root device $root_device.
|
$grubdir does not exist in the root device $root_device.
|
||||||
EOF
|
EOF
|
||||||
|
@ -248,9 +248,13 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy the GRUB images to the GRUB directory.
|
# Copy the GRUB images to the GRUB directory.
|
||||||
rm -f ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5
|
for file in ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5; do
|
||||||
cp ${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5 \
|
rm -f $file || exit 1
|
||||||
${grubdir} || exit 1
|
done
|
||||||
|
for file in \
|
||||||
|
${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5; do
|
||||||
|
cp -f $file ${grubdir} || exit 1
|
||||||
|
done
|
||||||
|
|
||||||
# Create a safe temporary file.
|
# Create a safe temporary file.
|
||||||
test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
|
test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
|
||||||
|
@ -262,7 +266,7 @@ setup $force_lba $install_drive
|
||||||
quit
|
quit
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if grep "Error: " $log_file >/dev/null; then
|
if grep "Error: " $log_file >/dev/null || test $debug = yes; then
|
||||||
cat $log_file 1>&2
|
cat $log_file 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue