* [PATCH v2] fix premature success dialog in installer script [not found] <N7lI8iF-GEc> @ 2025-08-06 5:54 ` 'Kasturi Shekar' via isar-users 2025-08-06 7:29 ` 'MOESSBAUER, Felix' via isar-users 2025-08-20 9:34 ` [PATCH 1/2 v3] " 'Kasturi Shekar' via isar-users 0 siblings, 2 replies; 11+ messages in thread From: 'Kasturi Shekar' via isar-users @ 2025-08-06 5:54 UTC (permalink / raw) To: isar-users; +Cc: Kasturi Shekar The 'Installation successful' message was displayed before the progress bar completed. Fixed by tracking the dialog --gauge PID and terminating it after bmaptool finishes. This ensures the progress bar runs to 100% before showing the final message. Changes: - Tracked the PID of the dialog --gauge process. - Killed gauge process after bmaptool completed. - Ensured success message is shown only after the progress bar ends. Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> --- .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh index aba81c84..fa1061c1 100755 --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then done ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & + gauge_pid=$! fi if ! bmaptool ${quiet_flag} copy ${bmap_options} "$installer_image_uri" "${installer_target_dev}"; then + kill "$gauge_pid" exit 1 fi +kill "$gauge_pid" 2>/dev/null + if ! $installer_unattended; then dialog --title "Reboot" \ --msgbox "Installation was successful. System will be rebooted. Please remove the USB stick." 6 60 -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250806055438.3318548-1-kasturi.shekar%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] fix premature success dialog in installer script 2025-08-06 5:54 ` [PATCH v2] fix premature success dialog in installer script 'Kasturi Shekar' via isar-users @ 2025-08-06 7:29 ` 'MOESSBAUER, Felix' via isar-users 2025-08-06 9:28 ` 'Shekar, Kasturi' via isar-users 2025-08-06 10:22 ` 'Shekar, Kasturi' via isar-users 2025-08-20 9:34 ` [PATCH 1/2 v3] " 'Kasturi Shekar' via isar-users 1 sibling, 2 replies; 11+ messages in thread From: 'MOESSBAUER, Felix' via isar-users @ 2025-08-06 7:29 UTC (permalink / raw) To: Shekar, Kasturi, isar-users On Wed, 2025-08-06 at 11:24 +0530, 'Kasturi Shekar' via isar-users wrote: > The 'Installation successful' message was displayed before the > progress bar completed. Fixed by tracking the dialog --gauge PID > and terminating it after bmaptool finishes. This ensures > the progress bar runs to 100% before showing the final message. Hi, I'm still wondering how that could happen. The bmaptool is the command that needs to terminate before showing the next message. How does the killing of the gauge help here? > > Changes: > - Tracked the PID of the dialog --gauge process. > - Killed gauge process after bmaptool completed. > - Ensured success message is shown only after the progress bar ends. > > Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> > --- > .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 > ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta-isar/recipes-installer/deploy- > image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes- > installer/deploy-image/files/usr/bin/deploy-image-wic.sh > index aba81c84..fa1061c1 100755 > --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > image-wic.sh > +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > image-wic.sh > @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then > done > ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & > > + gauge_pid=$! > fi > > if ! bmaptool ${quiet_flag} copy ${bmap_options} > "$installer_image_uri" "${installer_target_dev}"; then > + kill "$gauge_pid" > exit 1 As we exit anyways, why do we need to kill the gauge? Isn't it reaped when leaving the script? > fi > > +kill "$gauge_pid" 2>/dev/null Why do we need to ignore errors here? PS: This script could need some shellcheck improvements. Felix > + > if ! $installer_unattended; then > dialog --title "Reboot" \ > --msgbox "Installation was successful. System will be > rebooted. Please remove the USB stick." 6 60 > -- > 2.39.5 -- Siemens AG Linux Expert Center Friedrich-Ludwig-Bauer-Str. 3 85748 Garching, Germany -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/2e4e30c3201877ab4e9f8eee12e128d95e2db936.camel%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH v2] fix premature success dialog in installer script 2025-08-06 7:29 ` 'MOESSBAUER, Felix' via isar-users @ 2025-08-06 9:28 ` 'Shekar, Kasturi' via isar-users 2025-08-06 10:22 ` 'Shekar, Kasturi' via isar-users 1 sibling, 0 replies; 11+ messages in thread From: 'Shekar, Kasturi' via isar-users @ 2025-08-06 9:28 UTC (permalink / raw) To: MOESSBAUER, Felix, isar-users Hi, The gauge runs in a separate background process and reads from a named pipe. Even after bmap tool finishes, the read loop can remain active, causing the gauge to overlap with the success dialog. Explicitly killing the gauge ensures it terminates cleanly before the next message is shown. Thanks > -----Original Message----- > From: Moessbauer, Felix (FT RPD CED OES-DE) > <felix.moessbauer@siemens.com> > Sent: 06 August 2025 12:59 > To: Shekar, Kasturi (FT FDS CES LX PBU 2) <kasturi.shekar@siemens.com>; > isar-users@googlegroups.com > Subject: Re: [PATCH v2] fix premature success dialog in installer script > > On Wed, 2025-08-06 at 11:24 +0530, 'Kasturi Shekar' via isar-users > wrote: > > The 'Installation successful' message was displayed before the > > progress bar completed. Fixed by tracking the dialog --gauge PID and > > terminating it after bmaptool finishes. This ensures the progress bar > > runs to 100% before showing the final message. > > Hi, > > I'm still wondering how that could happen. The bmaptool is the command > that needs to terminate before showing the next message. How does the > killing of the gauge help here? > > > > > Changes: > > - Tracked the PID of the dialog --gauge process. > > - Killed gauge process after bmaptool completed. > > - Ensured success message is shown only after the progress bar ends. > > > > Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> > > --- > > .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 > > ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes- > > installer/deploy-image/files/usr/bin/deploy-image-wic.sh > > index aba81c84..fa1061c1 100755 > > --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > > image-wic.sh > > +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > > image-wic.sh > > @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then > > done > > ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & > > > > + gauge_pid=$! > > fi > > > > if ! bmaptool ${quiet_flag} copy ${bmap_options} > > "$installer_image_uri" "${installer_target_dev}"; then > > + kill "$gauge_pid" > > exit 1 > > As we exit anyways, why do we need to kill the gauge? > Isn't it reaped when leaving the script? > > > fi > > > > +kill "$gauge_pid" 2>/dev/null > > Why do we need to ignore errors here? > > PS: This script could need some shellcheck improvements. > > Felix > > > + > > if ! $installer_unattended; then > > dialog --title "Reboot" \ > > --msgbox "Installation was successful. System will be > > rebooted. Please remove the USB stick." 6 60 > > -- > > 2.39.5 > > -- > Siemens AG > Linux Expert Center > Friedrich-Ludwig-Bauer-Str. 3 > 85748 Garching, Germany -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/SG2PR06MB5311E0DFAF4AAB6A6FAB1B70942DA%40SG2PR06MB5311.apcprd06.prod.outlook.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH v2] fix premature success dialog in installer script 2025-08-06 7:29 ` 'MOESSBAUER, Felix' via isar-users 2025-08-06 9:28 ` 'Shekar, Kasturi' via isar-users @ 2025-08-06 10:22 ` 'Shekar, Kasturi' via isar-users 1 sibling, 0 replies; 11+ messages in thread From: 'Shekar, Kasturi' via isar-users @ 2025-08-06 10:22 UTC (permalink / raw) To: MOESSBAUER, Felix, isar-users `2>/dev/null` is just to suppress harmless kill errors on UI if the gauge wasn’t started or has already exited. Otherwise, users would see “No such process” messages during normal runs. I agree that the script could benefit from some ShellCheck cleanups. I can work on running it through ShellCheck and submit a follow‑up patch. Thanks, Kasturi > -----Original Message----- > From: Moessbauer, Felix (FT RPD CED OES-DE) > <felix.moessbauer@siemens.com> > Sent: 06 August 2025 12:59 > To: Shekar, Kasturi (FT FDS CES LX PBU 2) <kasturi.shekar@siemens.com>; > isar-users@googlegroups.com > Subject: Re: [PATCH v2] fix premature success dialog in installer script > > On Wed, 2025-08-06 at 11:24 +0530, 'Kasturi Shekar' via isar-users > wrote: > > The 'Installation successful' message was displayed before the > > progress bar completed. Fixed by tracking the dialog --gauge PID and > > terminating it after bmaptool finishes. This ensures the progress bar > > runs to 100% before showing the final message. > > Hi, > > I'm still wondering how that could happen. The bmaptool is the command > that needs to terminate before showing the next message. How does the > killing of the gauge help here? > > > > > Changes: > > - Tracked the PID of the dialog --gauge process. > > - Killed gauge process after bmaptool completed. > > - Ensured success message is shown only after the progress bar ends. > > > > Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> > > --- > > .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 > > ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes- > > installer/deploy-image/files/usr/bin/deploy-image-wic.sh > > index aba81c84..fa1061c1 100755 > > --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > > image-wic.sh > > +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > > image-wic.sh > > @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then > > done > > ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & > > > > + gauge_pid=$! > > fi > > > > if ! bmaptool ${quiet_flag} copy ${bmap_options} > > "$installer_image_uri" "${installer_target_dev}"; then > > + kill "$gauge_pid" > > exit 1 > > As we exit anyways, why do we need to kill the gauge? > Isn't it reaped when leaving the script? > > > fi > > > > +kill "$gauge_pid" 2>/dev/null > > Why do we need to ignore errors here? > > PS: This script could need some shellcheck improvements. > > Felix > > > + > > if ! $installer_unattended; then > > dialog --title "Reboot" \ > > --msgbox "Installation was successful. System will be > > rebooted. Please remove the USB stick." 6 60 > > -- > > 2.39.5 > > -- > Siemens AG > Linux Expert Center > Friedrich-Ludwig-Bauer-Str. 3 > 85748 Garching, Germany -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/SG2PR06MB5311FBB54D40ACD6E98DD9A8942DA%40SG2PR06MB5311.apcprd06.prod.outlook.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2 v3] fix premature success dialog in installer script 2025-08-06 5:54 ` [PATCH v2] fix premature success dialog in installer script 'Kasturi Shekar' via isar-users 2025-08-06 7:29 ` 'MOESSBAUER, Felix' via isar-users @ 2025-08-20 9:34 ` 'Kasturi Shekar' via isar-users 2025-08-20 9:34 ` [PATCH 2/2] deploy-image-wic.sh: fix shellcheck warnings 'Kasturi Shekar' via isar-users 2025-08-20 15:49 ` [PATCH 1/2 v3] fix premature success dialog in installer script 'MOESSBAUER, Felix' via isar-users 1 sibling, 2 replies; 11+ messages in thread From: 'Kasturi Shekar' via isar-users @ 2025-08-20 9:34 UTC (permalink / raw) To: isar-users; +Cc: Kasturi Shekar The 'Installation successful' message was displayed before the progress bar completed. Fixed by tracking the dialog --gauge PID and terminating it after bmaptool finishes. This ensures the progress bar runs to 100% before showing the final message. Changes: - Tracked the PID of the dialog --gauge process. - Killed gauge process after bmaptool completed. - Ensured success message is shown only after the progress bar ends. Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> --- .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh index aba81c84..fa1061c1 100755 --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then done ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & + gauge_pid=$! fi if ! bmaptool ${quiet_flag} copy ${bmap_options} "$installer_image_uri" "${installer_target_dev}"; then + kill "$gauge_pid" exit 1 fi +kill "$gauge_pid" 2>/dev/null + if ! $installer_unattended; then dialog --title "Reboot" \ --msgbox "Installation was successful. System will be rebooted. Please remove the USB stick." 6 60 -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250820093417.41825-1-kasturi.shekar%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] deploy-image-wic.sh: fix shellcheck warnings 2025-08-20 9:34 ` [PATCH 1/2 v3] " 'Kasturi Shekar' via isar-users @ 2025-08-20 9:34 ` 'Kasturi Shekar' via isar-users 2025-08-20 15:49 ` [PATCH 1/2 v3] fix premature success dialog in installer script 'MOESSBAUER, Felix' via isar-users 1 sibling, 0 replies; 11+ messages in thread From: 'Kasturi Shekar' via isar-users @ 2025-08-20 9:34 UTC (permalink / raw) To: isar-users; +Cc: Kasturi Shekar No functional changes, only style and readability fixes without altering runtime behavior Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> --- .../deploy-image/files/usr/bin/deploy-image-wic.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh index fa1061c1..e21da8e2 100755 --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh @@ -8,8 +8,7 @@ installdata=${INSTALL_DATA:-/install} SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; ) -. ${SCRIPT_DIR}/../lib/deploy-image-wic/handle-config.sh - +. "${SCRIPT_DIR}/../lib/deploy-image-wic/handle-config.sh" if ! $installer_unattended; then installer_image_uri=$(find "$installdata" -type f -iname "*.wic*" -a -not -iname "*.wic.bmap" -exec basename {} \;) @@ -37,7 +36,7 @@ if ! $installer_unattended; then # inspired by poky/meta/recipes-core/initrdscripts/files/install-efi.sh target_device_list="" current_root_dev_type=$(findmnt / -o fstype -n) - if [ ${current_root_dev_type} = "nfs" ]; then + if [ "$current_root_dev_type" = "nfs" ]; then current_root_dev="nfs" else current_root_dev=$(readlink -f "$(findmnt / -o source -n)") @@ -108,7 +107,7 @@ if ! $installer_unattended; then exit 0 fi else - installer_target_dev=/dev/$(echo "$target_device_list" | tr -d " ") + installer_target_dev="/dev/$(echo "$target_device_list" | tr -d " ")" fi TARGET_DEVICE_SIZE=$(lsblk --nodeps --noheadings -o SIZE "$installer_target_dev" | tr -d " ") if ! dialog --yes-label Ok --no-label Cancel \ @@ -186,11 +185,13 @@ if version_ge "$bmap_version" "3.6"; then gauge_pid=$! fi -if ! bmaptool ${quiet_flag} copy ${bmap_options} "$installer_image_uri" "${installer_target_dev}"; then +if ! bmaptool "$quiet_flag" copy "$bmap_options" "$installer_image_uri" "$installer_target_dev"; then kill "$gauge_pid" exit 1 fi +# Attempt to terminate the gauge process if still running. +# Errors are ignored since the process may already have exited. kill "$gauge_pid" 2>/dev/null if ! $installer_unattended; then -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250820093417.41825-2-kasturi.shekar%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2 v3] fix premature success dialog in installer script 2025-08-20 9:34 ` [PATCH 1/2 v3] " 'Kasturi Shekar' via isar-users 2025-08-20 9:34 ` [PATCH 2/2] deploy-image-wic.sh: fix shellcheck warnings 'Kasturi Shekar' via isar-users @ 2025-08-20 15:49 ` 'MOESSBAUER, Felix' via isar-users 2025-08-21 6:39 ` [PATCH v4 1/2] " 'Kasturi Shekar' via isar-users 1 sibling, 1 reply; 11+ messages in thread From: 'MOESSBAUER, Felix' via isar-users @ 2025-08-20 15:49 UTC (permalink / raw) To: Shekar, Kasturi, isar-users; +Cc: cedric.hombourger On Wed, 2025-08-20 at 15:04 +0530, 'Kasturi Shekar' via isar-users wrote: > The 'Installation successful' message was displayed before the > progress bar completed. Fixed by tracking the dialog --gauge PID > and terminating it after bmaptool finishes. This ensures > the progress bar runs to 100% before showing the final message. Hi, I really have a hard time following this series. There are at least 3 "v3" series on the ML, whereby only the first patch is tagged with v3. Please generate the patches with git format-patch --subject- prefix="PATCH v3" and send them with git send-email. Please also add the whole changelog from the initial version on to the cover letter. This helps to get an overview what changed over time. I'll do a review on the v4, if there will be any. Best regards, Felix > > Changes: > - Tracked the PID of the dialog --gauge process. > - Killed gauge process after bmaptool completed. > - Ensured success message is shown only after the progress bar ends. > > Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> > --- > .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 > ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta-isar/recipes-installer/deploy- > image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes- > installer/deploy-image/files/usr/bin/deploy-image-wic.sh > index aba81c84..fa1061c1 100755 > --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > image-wic.sh > +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy- > image-wic.sh > @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then > done > ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & > > + gauge_pid=$! > fi > > if ! bmaptool ${quiet_flag} copy ${bmap_options} > "$installer_image_uri" "${installer_target_dev}"; then > + kill "$gauge_pid" > exit 1 > fi > > +kill "$gauge_pid" 2>/dev/null > + > if ! $installer_unattended; then > dialog --title "Reboot" \ > --msgbox "Installation was successful. System will be > rebooted. Please remove the USB stick." 6 60 > -- > 2.39.5 -- Siemens AG Linux Expert Center Friedrich-Ludwig-Bauer-Str. 3 85748 Garching, Germany -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/e3c59c2c37a9a9661576aeb57a1bf8d6781ef526.camel%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 1/2] fix premature success dialog in installer script 2025-08-20 15:49 ` [PATCH 1/2 v3] fix premature success dialog in installer script 'MOESSBAUER, Felix' via isar-users @ 2025-08-21 6:39 ` 'Kasturi Shekar' via isar-users 2025-08-21 6:39 ` [PATCH v4 2/2] deploy-image-wic.sh: fix shellcheck warnings 'Kasturi Shekar' via isar-users 2025-08-21 6:39 ` [PATCH v4 0/2] fix premature success dialog 'Kasturi Shekar' via isar-users 0 siblings, 2 replies; 11+ messages in thread From: 'Kasturi Shekar' via isar-users @ 2025-08-21 6:39 UTC (permalink / raw) To: isar-users; +Cc: Kasturi Shekar The 'Installation successful' message was displayed before the progress bar completed. Fixed by tracking the dialog --gauge PID and terminating it after bmaptool finishes. This ensures the progress bar runs to 100% before showing the final message. Changes: - Tracked the PID of the dialog --gauge process. - Killed gauge process after bmaptool completed. - Ensured success message is shown only after the progress bar ends. Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> --- .../deploy-image/files/usr/bin/deploy-image-wic.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh index aba81c84..fa1061c1 100755 --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh @@ -183,12 +183,16 @@ if version_ge "$bmap_version" "3.6"; then done ) | dialog --gauge "Flashing image, please wait..." 10 70 0 & + gauge_pid=$! fi if ! bmaptool ${quiet_flag} copy ${bmap_options} "$installer_image_uri" "${installer_target_dev}"; then + kill "$gauge_pid" exit 1 fi +kill "$gauge_pid" 2>/dev/null + if ! $installer_unattended; then dialog --title "Reboot" \ --msgbox "Installation was successful. System will be rebooted. Please remove the USB stick." 6 60 -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250821063944.47909-1-kasturi.shekar%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 2/2] deploy-image-wic.sh: fix shellcheck warnings 2025-08-21 6:39 ` [PATCH v4 1/2] " 'Kasturi Shekar' via isar-users @ 2025-08-21 6:39 ` 'Kasturi Shekar' via isar-users 2025-08-21 6:39 ` [PATCH v4 0/2] fix premature success dialog 'Kasturi Shekar' via isar-users 1 sibling, 0 replies; 11+ messages in thread From: 'Kasturi Shekar' via isar-users @ 2025-08-21 6:39 UTC (permalink / raw) To: isar-users; +Cc: Kasturi Shekar No functional changes, only style and readability fixes without altering runtime behavior Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com> --- .../deploy-image/files/usr/bin/deploy-image-wic.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh index fa1061c1..e21da8e2 100755 --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh @@ -8,8 +8,7 @@ installdata=${INSTALL_DATA:-/install} SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; ) -. ${SCRIPT_DIR}/../lib/deploy-image-wic/handle-config.sh - +. "${SCRIPT_DIR}/../lib/deploy-image-wic/handle-config.sh" if ! $installer_unattended; then installer_image_uri=$(find "$installdata" -type f -iname "*.wic*" -a -not -iname "*.wic.bmap" -exec basename {} \;) @@ -37,7 +36,7 @@ if ! $installer_unattended; then # inspired by poky/meta/recipes-core/initrdscripts/files/install-efi.sh target_device_list="" current_root_dev_type=$(findmnt / -o fstype -n) - if [ ${current_root_dev_type} = "nfs" ]; then + if [ "$current_root_dev_type" = "nfs" ]; then current_root_dev="nfs" else current_root_dev=$(readlink -f "$(findmnt / -o source -n)") @@ -108,7 +107,7 @@ if ! $installer_unattended; then exit 0 fi else - installer_target_dev=/dev/$(echo "$target_device_list" | tr -d " ") + installer_target_dev="/dev/$(echo "$target_device_list" | tr -d " ")" fi TARGET_DEVICE_SIZE=$(lsblk --nodeps --noheadings -o SIZE "$installer_target_dev" | tr -d " ") if ! dialog --yes-label Ok --no-label Cancel \ @@ -186,11 +185,13 @@ if version_ge "$bmap_version" "3.6"; then gauge_pid=$! fi -if ! bmaptool ${quiet_flag} copy ${bmap_options} "$installer_image_uri" "${installer_target_dev}"; then +if ! bmaptool "$quiet_flag" copy "$bmap_options" "$installer_image_uri" "$installer_target_dev"; then kill "$gauge_pid" exit 1 fi +# Attempt to terminate the gauge process if still running. +# Errors are ignored since the process may already have exited. kill "$gauge_pid" 2>/dev/null if ! $installer_unattended; then -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250821063944.47909-2-kasturi.shekar%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 0/2] fix premature success dialog 2025-08-21 6:39 ` [PATCH v4 1/2] " 'Kasturi Shekar' via isar-users 2025-08-21 6:39 ` [PATCH v4 2/2] deploy-image-wic.sh: fix shellcheck warnings 'Kasturi Shekar' via isar-users @ 2025-08-21 6:39 ` 'Kasturi Shekar' via isar-users 2025-08-21 8:59 ` 'MOESSBAUER, Felix' via isar-users 1 sibling, 1 reply; 11+ messages in thread From: 'Kasturi Shekar' via isar-users @ 2025-08-21 6:39 UTC (permalink / raw) To: isar-users; +Cc: Kasturi Shekar Changes since v4: - added cover letter for maintainers understanding Changes since v3: - addressed shellcheck warnings for the script Changes since v2: - added more detailed commit message Changes since v1: - fix premature success dialog in installer script Kasturi Shekar (2): fix premature success dialog in installer script deploy-image-wic.sh: fix shellcheck warnings .../files/usr/bin/deploy-image-wic.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250821063944.47909-3-kasturi.shekar%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 0/2] fix premature success dialog 2025-08-21 6:39 ` [PATCH v4 0/2] fix premature success dialog 'Kasturi Shekar' via isar-users @ 2025-08-21 8:59 ` 'MOESSBAUER, Felix' via isar-users 0 siblings, 0 replies; 11+ messages in thread From: 'MOESSBAUER, Felix' via isar-users @ 2025-08-21 8:59 UTC (permalink / raw) To: Shekar, Kasturi, isar-users On Thu, 2025-08-21 at 12:09 +0530, 'Kasturi Shekar' via isar-users wrote: > Changes since v4: > - added cover letter for maintainers understanding Acked-by: Felix Moessbauer <felix.moessbauer@siemens.com> PS: Please send follow up versions of patch series as top-level email (no in-reply-to). Felix > > Changes since v3: > - addressed shellcheck warnings for the script > > Changes since v2: > - added more detailed commit message > > Changes since v1: > - fix premature success dialog in installer script > > Kasturi Shekar (2): > fix premature success dialog in installer script > deploy-image-wic.sh: fix shellcheck warnings > > .../files/usr/bin/deploy-image-wic.sh | 15 ++++++++++--- > -- > 1 file changed, 10 insertions(+), 5 deletions(-) > > -- > 2.39.5 -- Siemens AG Linux Expert Center Friedrich-Ludwig-Bauer-Str. 3 85748 Garching, Germany -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/4fae774ad02e6eb5bbda9b1ceb3f980eaf53b56c.camel%40siemens.com. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-08-21 8:59 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <N7lI8iF-GEc> 2025-08-06 5:54 ` [PATCH v2] fix premature success dialog in installer script 'Kasturi Shekar' via isar-users 2025-08-06 7:29 ` 'MOESSBAUER, Felix' via isar-users 2025-08-06 9:28 ` 'Shekar, Kasturi' via isar-users 2025-08-06 10:22 ` 'Shekar, Kasturi' via isar-users 2025-08-20 9:34 ` [PATCH 1/2 v3] " 'Kasturi Shekar' via isar-users 2025-08-20 9:34 ` [PATCH 2/2] deploy-image-wic.sh: fix shellcheck warnings 'Kasturi Shekar' via isar-users 2025-08-20 15:49 ` [PATCH 1/2 v3] fix premature success dialog in installer script 'MOESSBAUER, Felix' via isar-users 2025-08-21 6:39 ` [PATCH v4 1/2] " 'Kasturi Shekar' via isar-users 2025-08-21 6:39 ` [PATCH v4 2/2] deploy-image-wic.sh: fix shellcheck warnings 'Kasturi Shekar' via isar-users 2025-08-21 6:39 ` [PATCH v4 0/2] fix premature success dialog 'Kasturi Shekar' via isar-users 2025-08-21 8:59 ` 'MOESSBAUER, Felix' via isar-users
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox