mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 07:39:22 +00:00
Avoid use of non-portable echo -n in grub-mkconfig
util/grub-mkconfig_lib.in(version_test_gt): "echo -n" is not really needed, final newline is stripped by command substitution. util/grub.d/10_kfreebsd.in, util/grub.d/10_linux.in, util/grub.d/20_linux_xen.in: change how list is built, to avoid echo -n completely. util/grub.d/30_os-prober.in: add spaces to printed line directly Closes 43668.
This commit is contained in:
1 parent
06eadf5ebf
commit
cdae5bf208
6 files changed
+36
-19
No files matched your search
@@ -137,7 +137,8 @@ EOF
|
||||
EOF
|
||||
}
|
||||
|
||||
linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
|
||||
linux_list=
|
||||
for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
|
||||
if grub_file_is_not_garbage "$i"; then
|
||||
basename=$(basename $i)
|
||||
version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
|
||||
@@ -149,9 +150,9 @@ linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
|
||||
break
|
||||
fi
|
||||
done
|
||||
if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null); then echo -n "$i " ; fi
|
||||
if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null); then linux_list="$linux_list $i" ; fi
|
||||
fi
|
||||
done`
|
||||
done
|
||||
if [ "x${linux_list}" = "x" ] ; then
|
||||
exit 0
|
||||
fi
|
||||
@@ -165,9 +166,10 @@ file_is_not_sym () {
|
||||
esac
|
||||
}
|
||||
|
||||
xen_list=`for i in /boot/xen*; do
|
||||
if grub_file_is_not_garbage "$i" && file_is_not_sym "$i" ; then echo -n "$i " ; fi
|
||||
done`
|
||||
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
|
||||
done
|
||||
prepare_boot_cache=
|
||||
boot_device_id=
|
||||
|
||||
|
||||
Reference in new issue
Block a user