From 8eb6ce0b69fda80b2adf814f9ad7470ba8578aaf Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 25 Oct 2021 12:03:26 -0400 Subject: [PATCH] Specify absolute path for mktemp mktemp defaults to relative, to produce the correct behavior, must be absolute template. --- .../el7/profiles/default/scripts/functions | 10 +++++----- .../el8-diskless/profiles/default/scripts/functions | 10 +++++----- .../el8/profiles/default/scripts/functions | 10 +++++----- .../genesis/profiles/default/scripts/functions | 10 +++++----- .../suse15-diskless/profiles/default/scripts/functions | 10 +++++----- .../suse15/profiles/hpc/scripts/functions | 10 +++++----- .../ubuntu20.04/profiles/default/scripts/functions | 10 +++++----- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions b/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/functions b/confluent_osdeploy/genesis/profiles/default/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/genesis/profiles/default/scripts/functions +++ b/confluent_osdeploy/genesis/profiles/default/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) diff --git a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions index c52c3b3f..3c50f424 100644 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions @@ -63,7 +63,7 @@ fetch_remote() { } source_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -77,7 +77,7 @@ source_remote_parts() { } run_remote_parts() { - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) apiclient=/opt/confluent/bin/apiclient if [ -f /etc/confluent/apiclient ]; then apiclient=/etc/confluent/apiclient @@ -96,7 +96,7 @@ source_remote() { echo '---------------------------------------------------------------------------' echo Sourcing $1 from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Sourcing from $confluentscripttmpdir cd $confluentscripttmpdir @@ -118,7 +118,7 @@ run_remote() { echo '---------------------------------------------------------------------------' echo Running $requestedcmd from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ if [ -z "$confluentscripttmpdir" ]; then - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) fi echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir @@ -148,7 +148,7 @@ run_remote_python() { fi echo '---------------------------------------------------------------------------' echo Running python script "'$*'" from https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/ - confluentscripttmpdir=$(mktemp -d confluentscripts.XXXXXXXXX) + confluentscripttmpdir=$(mktemp -d /tmp/confluentscripts.XXXXXXXXX) echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1)