From 0b52761bc49eaa366495739c6d7924fb7c617c9a944e429a857bb2ef1344ae0e Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 11 May 2023 05:03:33 +0000 Subject: [PATCH] Accepting request 1085607 from home:michael-chang:branches:Base:System - grub2-once: Fix 'sh: terminal_output: command not found' error (bsc#1204563) OBS-URL: https://build.opensuse.org/request/show/1085607 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=454 --- grub2-once | 6 ++++++ grub2.changes | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/grub2-once b/grub2-once index 5b8a6a3..5cd60cc 100644 --- a/grub2-once +++ b/grub2-once @@ -23,6 +23,12 @@ sub sh_test($) { my ( $exp ) = @_; dPrint( "?? '$exp' "); + + # Don't test grub command return status from linux shell, this often results + # in command not found error. In such case the expression often has no + # opening bracket and just returning false here to signify -ENOCMD error. + return 0 if ( $exp =~ m{^\s*[^\[]}); + $exp .= " ]" if ( $exp =~ m{^\[.*[^\]]\s*$} ); # gnaaa #my $t = qx{set -x; $exp}; my $t = qx{$exp}; diff --git a/grub2.changes b/grub2.changes index 4d0f4ba..5c61fba 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 4 06:58:12 UTC 2023 - Michael Chang + +- grub2-once: Fix 'sh: terminal_output: command not found' error (bsc#1204563) + ------------------------------------------------------------------- Wed Apr 26 07:22:03 UTC 2023 - Gary Ching-Pang Lin