grub-generator: If OSTREE_BOOT_PARTITION is not set, default to /boot

Closes: #1326
Approved by: cgwalters
This commit is contained in:
Carlos Alberto Lopez Perez authored and Atomic Bot committed 2017-11-15 14:03:24 +00:00
1 parent 4a58364cfa
commit 20996d0da3
1 file changed
+6 -1
+6 -1
View File
@@ -61,7 +61,12 @@ read_config()
populate_menu()
{
boot_prefix="${OSTREE_BOOT_PARTITION}"
# Default to /boot if OSTREE_BOOT_PARTITION is not set and /boot is on the same device than ostree/repo
if [ -z ${OSTREE_BOOT_PARTITION+x} ] && [ -d /boot/ostree ] && [ -d /ostree/repo ] && [ $(stat -c '%d' /boot/ostree) -eq $(stat -c '%d' /ostree/repo) ]; then
boot_prefix="/boot"
else
boot_prefix="${OSTREE_BOOT_PARTITION}"
fi
for config in $(ls ${entries_path}); do
read_config ${config}
menu="${menu}menuentry '${title}' {\n"