From 9a0c4ce4ce1e4030b0498d0bb948e3f62d9ab686 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 9 Oct 2020 14:07:58 -0400 Subject: [PATCH] Fix function handling of subdirs of scripts --- confluent_osdeploy/el7/profiles/default/scripts/functions | 3 +++ confluent_osdeploy/el8/profiles/default/scripts/functions | 3 +++ 2 files changed, 6 insertions(+) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index 14bce404..c299d30d 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -12,6 +12,7 @@ fetch_remote() { curlargs=" --cacert /etc/confluent/ca.pem" fi set_confluent_vars + mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -29,6 +30,7 @@ run_remote() { tmpdir=$(mktemp -d) echo Executing in $tmpdir cd $tmpdir + mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi chmod +x $1 @@ -55,6 +57,7 @@ run_remote_python() { tmpdir=$(mktemp -d) echo Executing in $tmpdir cd $tmpdir + mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi /usr/libexec/platform-python $* diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index 14bce404..c299d30d 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -12,6 +12,7 @@ fetch_remote() { curlargs=" --cacert /etc/confluent/ca.pem" fi set_confluent_vars + mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -29,6 +30,7 @@ run_remote() { tmpdir=$(mktemp -d) echo Executing in $tmpdir cd $tmpdir + mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $requestedcmd failed to download; return 1; fi chmod +x $1 @@ -55,6 +57,7 @@ run_remote_python() { tmpdir=$(mktemp -d) echo Executing in $tmpdir cd $tmpdir + mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi /usr/libexec/platform-python $*