templates/20_linux_xen: Ignore xenpolicy and config files too
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 <ian.jackson@eu.citrix.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
96be75ecbd
commit
7a9b30143b
1 changed files with 6 additions and 2 deletions
|
@ -173,10 +173,14 @@ if [ "x${linux_list}" = "x" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
file_is_not_sym () {
|
file_is_not_xen_garbage () {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*/xen-syms-*)
|
*/xen-syms-*)
|
||||||
return 1;;
|
return 1;;
|
||||||
|
*/xenpolicy-*)
|
||||||
|
return 1;;
|
||||||
|
*/*.config)
|
||||||
|
return 1;;
|
||||||
*)
|
*)
|
||||||
return 0;;
|
return 0;;
|
||||||
esac
|
esac
|
||||||
|
@ -184,7 +188,7 @@ file_is_not_sym () {
|
||||||
|
|
||||||
xen_list=
|
xen_list=
|
||||||
for i in /boot/xen*; do
|
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
|
done
|
||||||
prepare_boot_cache=
|
prepare_boot_cache=
|
||||||
boot_device_id=
|
boot_device_id=
|
||||||
|
|
Loading…
Reference in a new issue