copy_data_to_pki(): Immediate exit-with-error or 'shift' on success
This captures any copy errors and/or clears the excess second parameter. Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
parent
4ff6b773d2
commit
ef59ea7dd9
@ -700,7 +700,8 @@ install_data_to_pki () {
|
|||||||
|
|
||||||
# Copy the source to the PKI
|
# Copy the source to the PKI
|
||||||
copy_data_to_pki () {
|
copy_data_to_pki () {
|
||||||
cp ${2:+-R} "$1" "$EASYRSA_PKI"
|
cp ${2:+-R} "$1" "$EASYRSA_PKI" || return
|
||||||
|
shift # Clear recurse
|
||||||
} # => copy_data_to_pki ()
|
} # => copy_data_to_pki ()
|
||||||
|
|
||||||
# Disable terminal echo, if possible, otherwise warn
|
# Disable terminal echo, if possible, otherwise warn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user