From 18f4c76730fc149c55261b885d05ea09e143c405 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 21 Aug 2020 10:33:56 -0400 Subject: [PATCH] Fix end code for run_remote Output was missing due to shift. Save cmdline before shifting and use it on way out. --- confluent_osdeploy/el7/profiles/default/scripts/functions | 5 +++-- confluent_osdeploy/el8/profiles/default/scripts/functions | 5 +++-- .../genesis/profiles/default/scripts/functions | 5 +++-- confluent_osdeploy/rhvh4/profiles/default/scripts/functions | 5 +++-- confluent_osdeploy/suse15/profiles/hpc/scripts/functions | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index 53f42c52..cd5de83f 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -1,5 +1,6 @@ run_remote() { - echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" + requestedcmd="'$*'" + echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -9,7 +10,7 @@ run_remote() { fi shift ./$cmd $* - echo "'$*' exited with code $?" + echo "$requestedcmd exited with code $?" cd - } diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index 53f42c52..cd5de83f 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -1,5 +1,6 @@ run_remote() { - echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" + requestedcmd="'$*'" + echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -9,7 +10,7 @@ run_remote() { fi shift ./$cmd $* - echo "'$*' exited with code $?" + echo "$requestedcmd exited with code $?" cd - } diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/functions b/confluent_osdeploy/genesis/profiles/default/scripts/functions index 53f42c52..cd5de83f 100644 --- a/confluent_osdeploy/genesis/profiles/default/scripts/functions +++ b/confluent_osdeploy/genesis/profiles/default/scripts/functions @@ -1,5 +1,6 @@ run_remote() { - echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" + requestedcmd="'$*'" + echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -9,7 +10,7 @@ run_remote() { fi shift ./$cmd $* - echo "'$*' exited with code $?" + echo "$requestedcmd exited with code $?" cd - } diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/functions b/confluent_osdeploy/rhvh4/profiles/default/scripts/functions index 53f42c52..cd5de83f 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/functions +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/functions @@ -1,5 +1,6 @@ run_remote() { - echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" + requestedcmd="'$*'" + echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -9,7 +10,7 @@ run_remote() { fi shift ./$cmd $* - echo "'$*' exited with code $?" + echo "$requestedcmd exited with code $?" cd - } diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions index 8ba8cbb3..645f67e2 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions @@ -1,12 +1,13 @@ run_remote() { - echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" + requestedcmd="'$*'" + echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 cmd=$1 shift ./$cmd $* - echo "'$*' exited with code $?" + echo "$requestedcmd exited with code $?" cd - }