refactoring changes from sequpgrade (endReturn, ...) and some modernizations

This commit is contained in:
2023-01-03 15:49:08 +01:00
parent 215135e8aa
commit 3c22d5729f
69 changed files with 553 additions and 654 deletions

View File

@@ -20,7 +20,7 @@ step_3_alias() { echo "create"; }
step_3() {
exep "ssh-keygen -l -f $toolIdentity 2>>/dev/null"
if [ $? -eq 0 ]; then
echo " [I] Using key found at $toolIdentity."
info "Using key found at $toolIdentity."
return 0
fi
exe ssh-keygen -b 4096 -t rsa -C "$(hostname)" -N "" -f $(realpath $toolIdentity)
@@ -70,7 +70,7 @@ step_5() {
exe ssh-copy-id -p ${sshPort} ${sshOption} ${sshHost}
}
step_10_info() {
step_10_info() {
echo "Send command(ssh)/file(scp) list to remote(s)"
echoinfo "[USER:HOST] and [PORT] are overwritten by \"host\" command from <CMDLIST>"
}
@@ -105,7 +105,7 @@ step_10() {
# STRING2 h - port
# f - destination file path
# c - not used
#
#
# OPTIONS h - not used
# f - Options passed to scp
# c - not used
@@ -160,7 +160,7 @@ parseList() {
if [ -z "$aHost" ]; then
errorMsg="No host found"
saveReturn 1
else
else
exe scp $lopt -P $aPort $lsrc ${aHost}:$ldst
saveReturn $?
errorMsg="scp to $aHost failed with $?"