From 5528b60effb65b38158d677bda1c4c9fb0dbfada Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Sun, 28 Apr 2024 20:35:56 +0100 Subject: [PATCH] fix: use temp file mktemp prior to machinectl docker --- docs/install-docker.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/install-docker.sh b/docs/install-docker.sh index d7ba0b0..0b10a89 100644 --- a/docs/install-docker.sh +++ b/docs/install-docker.sh @@ -16,7 +16,6 @@ fi export DEBIAN_FRONTEND=noninteractive # Global Vars -TEMP_DIR=$(mktemp -d) OS_NAME="debian" check_user_not_root() { @@ -62,7 +61,7 @@ check_user_not_root() { if [ "${ext: -3}" = ".sh" ]; then # User called script directly, copy to temp dir root_script_path="$(readlink -f "$0")" - temp_script_path="${TEMP_DIR}/$(basename "$0")" + temp_script_path="$(mktemp)" cp "$root_script_path" "$temp_script_path" chown svchot:svchot "$temp_script_path" chmod +x "$temp_script_path"