mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 07:39:22 +00:00
* util/grub-mkconfig.in: Check the config script for syntax errors
before saving.
This commit is contained in:
commit
2f4e8053e0
2 files changed
+12
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2010-09-19 BVK Chaitanya <bvk.groups@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkconfig.in: Check the config script for syntax errors
|
||||||
|
before saving.
|
||||||
|
|
||||||
2010-09-19 Colin Watson <cjwatson@ubuntu.com>
|
2010-09-19 Colin Watson <cjwatson@ubuntu.com>
|
||||||
2010-09-19 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-09-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
|||||||
@@ -305,8 +305,15 @@ for i in ${grub_mkconfig_dir}/* ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if test "x${grub_cfg}" != "x" ; then
|
if test "x${grub_cfg}" != "x" ; then
|
||||||
|
if ! grub-script-check ${grub_cfg}.new; then
|
||||||
|
echo "Syntax errors are detected in generated GRUB config file." >&2
|
||||||
|
echo "Ensure that there are no errors in /etc/default/grub" >&2
|
||||||
|
echo "and /etc/grub.d/* files or please file a bug report with" >&2
|
||||||
|
echo "${grub_cfg}.new file attached." >&2
|
||||||
|
else
|
||||||
# none of the children aborted with error, install the new grub.cfg
|
# none of the children aborted with error, install the new grub.cfg
|
||||||
mv -f ${grub_cfg}.new ${grub_cfg}
|
mv -f ${grub_cfg}.new ${grub_cfg}
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "done" >&2
|
echo "done" >&2
|
||||||
Reference in new issue
Block a user