mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 13:31:52 +00:00
Make TMPDIR optional
This commit is contained in:
parent
4ca42f075c
commit
1a6509083f
@ -441,7 +441,7 @@ function cluster::mesos::docker::create_basic_user {
|
|||||||
# Buffers command output to file, prints output on failure.
|
# Buffers command output to file, prints output on failure.
|
||||||
function cluster::mesos::docker::buffer_output {
|
function cluster::mesos::docker::buffer_output {
|
||||||
local cmd="$@"
|
local cmd="$@"
|
||||||
local tempfile="$(mktemp "${TMPDIR}/buffer.XXXXXX")"
|
local tempfile="$(mktemp "${TMPDIR:-/tmp}/buffer.XXXXXX")"
|
||||||
trap "kill -TERM \${PID}; rm '${tempfile}'" TERM INT
|
trap "kill -TERM \${PID}; rm '${tempfile}'" TERM INT
|
||||||
${cmd} &> "${tempfile}" &
|
${cmd} &> "${tempfile}" &
|
||||||
PID=$!
|
PID=$!
|
||||||
|
Loading…
Reference in New Issue
Block a user