[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GRUB PATCH 1/2] 20_linux_xen: Ignore xenpolicy and config files too
From: |
Ian Jackson |
Subject: |
[GRUB PATCH 1/2] 20_linux_xen: Ignore xenpolicy and config files too |
Date: |
Wed, 20 May 2020 13:14:19 +0100 |
"file_is_not_sym" currently only checks for xen-syms. Extend it to
disregard xenpolicy (XSM policy files) and files ending .config (which
are built by the Xen upstream build system in some configurations and
can therefore end up in /boot).
Rename the function accordingly, to "file_is_not_xen_garbage".
Signed-off-by: Ian Jackson <address@hidden>
---
util/grub.d/20_linux_xen.in | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 81e5f0d7e..30da49d66 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -181,10 +181,14 @@ if [ "x${linux_list}" = "x" ] ; then
exit 0
fi
-file_is_not_sym () {
+file_is_not_xen_garbage () {
case "$1" in
*/xen-syms-*)
return 1;;
+ */xenpolicy-*)
+ return 1;;
+ */*.config)
+ return 1;;
*)
return 0;;
esac
@@ -192,7 +196,7 @@ file_is_not_sym () {
xen_list=
for i in /boot/xen*; do
- if grub_file_is_not_garbage "$i" && file_is_not_sym "$i" ; then
xen_list="$xen_list $i" ; fi
+ if grub_file_is_not_garbage "$i" && file_is_not_xen_garbage "$i" ; then
xen_list="$xen_list $i" ; fi
done
prepare_boot_cache=
boot_device_id=
--
2.20.1