2010-09-08 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Improve with (optional) parameters to specify device and relative path. * util/grub-install.in: Use is_path_readable_by_grub() to verify readability of a few critical files. * util/grub-mkconfig.in: Use is_path_readable_by_grub() to verify readability of grub.cfg.new.
This commit is contained in:
parent
27f21a8bb6
commit
6b8e78aee3
4 changed files with 34 additions and 5 deletions
|
@ -303,6 +303,12 @@ for i in ${grub_mkconfig_dir}/* ; do
|
|||
esac
|
||||
done
|
||||
|
||||
# Verify readability of ${grub_cfg}.new
|
||||
if is_path_readable_by_grub ${grub_cfg}.new ; then : ; else
|
||||
echo "GRUB is unable to read ${grubdir}/${file}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "x${grub_cfg}" != "x" ; then
|
||||
# none of the children aborted with error, install the new grub.cfg
|
||||
mv -f ${grub_cfg}.new ${grub_cfg}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue