From 4cf1a1c00a71a4c5390a7816390e5560fbb1b0f6 Mon Sep 17 00:00:00 2001 From: YourFritz Date: Thu, 14 Nov 2019 04:46:03 +0100 Subject: [PATCH] gui_bootmanager: improve handling of errors from alternative filesystem mount attempts --- bootmanager/gui_bootmanager | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bootmanager/gui_bootmanager b/bootmanager/gui_bootmanager index 4d11a0d3..91e740ac 100755 --- a/bootmanager/gui_bootmanager +++ b/bootmanager/gui_bootmanager @@ -642,7 +642,7 @@ get_system_date() ) ####################################################################################################### # # -# get system build date from specified root as a string valu with localization # +# get system build date from specified root as a string value with localization # # # # $1 - system root directory # # # @@ -1216,7 +1216,7 @@ collect_data() alternative_branding_fixed=0 if is_kernel_present "$(get_partition "$kernel_name" "$inactive_name")"; then alternative_is_missing=0 - spinlock get 10 && mp="$(mount_alternative_system)" + spinlock get 10 && mp="$(printf "%s" "$(mount_alternative_system)")" if ! [ -z "$mp" ]; then readonly alternative_version="$(get_system_version "$mp")" if ! [ -z "$alternative_version" ]; then @@ -1349,7 +1349,7 @@ case "$1" in printf "inactive filesystem = %s\n" "$(get_partition "$filesystem_name" "$inactive_name")" if is_kernel_present "$(get_partition "$kernel_name" "$inactive_name")"; then spinlock_pid=$$ - spinlock get 10 && mp="$(mount_alternative_system)" + spinlock get 10 && mp="$(printf "%s" "$(mount_alternative_system)")" printf "inactive filesystem mounted on %s\n" "$mp" if ! [ -z "$mp" ]; then printf "inactive system version = %s\n" "$(get_system_version "$mp")" @@ -1359,6 +1359,8 @@ case "$1" in printf "brandings supported on inactive system = %s%s\n" "$(get_brandings "$mp")" "$([ -z "$(get_fixed_branding "$mp")" ] || printf " (fixed)")" dismount_alternative_system printf "inactive filesystem dismounted\n" + else + printf "inactive filesystem could not be mounted\n" fi spinlock release else