From ab58541ea1382b1aa9397a6eba39df7fd5a0305e Mon Sep 17 00:00:00 2001 From: Erico Mendonca Date: Fri, 8 Nov 2024 06:01:43 -0300 Subject: [PATCH] Fix ISO location logic in 99_migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is code in the grub script which checks if the location of the installed live migration ISO file is on the same root device than (/). After the move of the installation target to "/migration-image", that location check is no longer needed. This commit drops the extra checks for /usr/share and /usr Co-authored-by: Marcus Schäfer --- grub.d/99_migration | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/grub.d/99_migration b/grub.d/99_migration index 672fc69..693b42d 100644 --- a/grub.d/99_migration +++ b/grub.d/99_migration @@ -20,23 +20,8 @@ root_device=$( lsblk -p -n -r -o NAME,MOUNTPOINT | grep -E "/$" | uniq | cut -f1 -d" " ) -# check if location of migration_iso is not on the root_device -image_fs_device=${root_device} -index=4 -for path in "/usr/share" "/usr";do - if mountpoint -q ${path};then - image_fs_device=$( - lsblk -p -n -r -o NAME,MOUNTPOINT |\ - grep -E "${path}$" | uniq | cut -f1 -d" " - ) - migration_iso=/$(echo "${migration_iso}" | cut -f"${index}"- -d/) - break - fi - index=$((index -1)) -done - -image_fs_uuid=$(blkid -s UUID -o value "${image_fs_device}") -image_fs_type=$(blkid -s TYPE -o value "${image_fs_device}") +image_fs_uuid=$(blkid -s UUID -o value "${root_device}") +image_fs_type=$(blkid -s TYPE -o value "${root_device}") if [[ ${image_fs_type} =~ ^ext[[:digit:]] ]] ; then image_fs_type="ext2"