Print error to stderr

This commit is contained in:
Karel Srot 2024-10-21 17:08:42 +02:00
commit 0cc49a3dea

View file

@ -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
}