diff mbox series

[isar-cip-core] initramfs-crypt-hook: Fix Error Messages in case of missing binaries

Message ID 20230517115722.1415937-1-Quirin.Gylstorff@siemens.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core] initramfs-crypt-hook: Fix Error Messages in case of missing binaries | expand

Commit Message

Quirin Gylstorff May 17, 2023, 11:57 a.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This prints the error message correctly to the log file instead of only
printing "(ERROR):"

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../initramfs-crypt-hook/files/encrypt_partition.clevis.hook    | 2 +-
 .../initramfs-crypt-hook/files/encrypt_partition.systemd.hook   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jan Kiszka May 17, 2023, 3:35 p.m. UTC | #1
On 17.05.23 13:57, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> This prints the error message correctly to the log file instead of only
> printing "(ERROR):"
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  .../initramfs-crypt-hook/files/encrypt_partition.clevis.hook    | 2 +-
>  .../initramfs-crypt-hook/files/encrypt_partition.systemd.hook   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook
> index a034d5d..23dce93 100755
> --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook
> +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook
> @@ -23,7 +23,7 @@ if [ -f /etc/os-release ]; then
>      . /etc/os-release
>  fi
>  hook_error() {
> -    echo "(ERROR): $2" >&2
> +    echo "(ERROR): $1" >&2
>      exit 1
>  }
>  
> diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook
> index 077f43a..e3a296f 100755
> --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook
> +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook
> @@ -20,7 +20,7 @@ esac
>  . /usr/share/initramfs-tools/hook-functions
>  
>  hook_error() {
> -    echo "(ERROR): $2" >&2
> +    echo "(ERROR): $1" >&2
>      exit 1
>  }
>  

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook
index a034d5d..23dce93 100755
--- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook
+++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.clevis.hook
@@ -23,7 +23,7 @@  if [ -f /etc/os-release ]; then
     . /etc/os-release
 fi
 hook_error() {
-    echo "(ERROR): $2" >&2
+    echo "(ERROR): $1" >&2
     exit 1
 }
 
diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook
index 077f43a..e3a296f 100755
--- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook
+++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook
@@ -20,7 +20,7 @@  esac
 . /usr/share/initramfs-tools/hook-functions
 
 hook_error() {
-    echo "(ERROR): $2" >&2
+    echo "(ERROR): $1" >&2
     exit 1
 }