From 910490cc74442946386149b480bdce4ee7120106 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Jul 2020 17:08:38 -0400 Subject: [PATCH] Add arguments to the run_remote functions This will help provide flexibility in invoking remote scripts without hardcoding arguments into the scripts --- confluent_osdeploy/el8/profiles/default/scripts/functions | 5 +++-- confluent_osdeploy/rhvh4/profiles/default/scripts/functions | 5 +++-- confluent_osdeploy/suse15/profiles/hpc/scripts/functions | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index c5b9a992..59e64554 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -2,13 +2,14 @@ run_remote() { cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 - ./$1 + cmd=$(shift) + ./$cmd $* cd - } run_remote_python() { cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 - /usr/libexec/platform-python $1 + /usr/libexec/platform-python $* cd - } diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/functions b/confluent_osdeploy/rhvh4/profiles/default/scripts/functions index c5b9a992..59e64554 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/functions +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/functions @@ -2,13 +2,14 @@ run_remote() { cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 - ./$1 + cmd=$(shift) + ./$cmd $* cd - } run_remote_python() { cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 - /usr/libexec/platform-python $1 + /usr/libexec/platform-python $* cd - } diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions index e84bc821..16afe4eb 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions @@ -2,13 +2,14 @@ run_remote() { cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 - ./$1 + cmd=$(shift) + ./$cmd $* cd - } run_remote_python() { cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 - python3 $1 + python3 $* cd - }