From 0cc49a3deab21d3fb3e276652dc3017e4852c238 Mon Sep 17 00:00:00 2001 From: Karel Srot Date: Mon, 21 Oct 2024 17:08:42 +0200 Subject: [PATCH] Print error to stderr --- Library/token-manipulation/lib.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/token-manipulation/lib.sh b/Library/token-manipulation/lib.sh index 04a4a28..f0d7d16 100644 --- a/Library/token-manipulation/lib.sh +++ b/Library/token-manipulation/lib.sh @@ -121,10 +121,10 @@ pkcsGetTokenSlot() { SLOT=$( egrep "(^slot|stdll = libpkcs11_$TYPE.so)" $CONF | grep -B 1 "libpkcs11" | sed -n -e '1,1 s/slot //' -e '1,1 p' ) echo $SLOT else - echo "Error: pkcsGetTokenSlot: could not find type $TYPE in $CONF" - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - cat $CONF - echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + echo "Error: pkcsGetTokenSlot: could not find type $TYPE in $CONF" >&2 + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >&2 + cat $CONF >&2 + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >&2 return 1 fi }