From c03e1eef844c7d1d1daff060d0c470ce271dd00c Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Sun, 16 Jul 2023 01:50:27 +0100 Subject: [PATCH] check_serial_unique(): Reduction Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 2c896ee..00942e2 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -2457,8 +2457,6 @@ check_serial_unique() { : # ok esac - [ "$2" = batch ] && internal_batch=1 - unset -v unique_serial_true # Check for openssl -status of serial number @@ -2482,13 +2480,12 @@ check_serial_unique() { esac # In batch mode return result only - if [ "$internal_batch" ] || [ "$EASYRSA_BATCH" ] - then + if [ "$2" = batch ] || [ "$EASYRSA_BATCH" ]; then if [ "$unique_serial_true" ]; then - unset -v unique_serial_true internal_batch + unset -v unique_serial_true return 0 else - unset -v unique_serial_true internal_batch + unset -v unique_serial_true return 1 fi fi