@@ -86,9 +86,6 @@ readonly -f os::util::environment::setup_time_vars
86
86
# - export USE_IMAGES
87
87
# - export TAG
88
88
function os::util::environment::setup_all_server_vars() {
89
- local subtempdir=$1
90
-
91
- os::util::environment::setup_tmpdir_vars " ${subtempdir} "
92
89
os::util::environment::setup_kubelet_vars
93
90
os::util::environment::setup_etcd_vars
94
91
os::util::environment::setup_server_vars
@@ -123,9 +120,6 @@ readonly -f os::util::environment::update_path_var
123
120
#
124
121
# Globals:
125
122
# - TMPDIR
126
- # - LOG_DIR
127
- # - ARTIFACT_DIR
128
- # - USE_SUDO
129
123
# Arguments:
130
124
# - 1: the path under the root temporary directory for OpenShift where these subdirectories should be made
131
125
# Returns:
@@ -135,6 +129,7 @@ readonly -f os::util::environment::update_path_var
135
129
# - export ARTIFACT_DIR
136
130
# - export FAKE_HOME_DIR
137
131
# - export HOME
132
+ # - export OS_TMP_ENV_SET
138
133
function os::util::environment::setup_tmpdir_vars() {
139
134
local sub_dir=$1
140
135
@@ -146,26 +141,12 @@ function os::util::environment::setup_tmpdir_vars() {
146
141
export VOLUME_DIR
147
142
ARTIFACT_DIR=" ${ARTIFACT_DIR:- ${BASETMPDIR} / artifacts} "
148
143
export ARTIFACT_DIR
149
-
150
- # change the location of $HOME so no one does anything naughty
151
144
FAKE_HOME_DIR=" ${BASETMPDIR} /openshift.local.home"
152
145
export FAKE_HOME_DIR
153
- HOME=" ${FAKE_HOME_DIR} "
154
- export HOME
155
146
156
- # ensure that the directories are clean
157
- if os::util::find::system_binary " findmnt" & > /dev/null; then
158
- for target in $( ${USE_SUDO: +sudo} findmnt --output TARGET --list ) ; do
159
- if [[ " ${target} " == " ${BASETMPDIR} " * ]]; then
160
- ${USE_SUDO: +sudo} umount " ${target} "
161
- fi
162
- done
163
- fi
147
+ mkdir -p " ${LOG_DIR} " " ${VOLUME_DIR} " " ${ARTIFACT_DIR} " " ${FAKE_HOME_DIR} "
164
148
165
- for directory in " ${BASETMPDIR} " " ${LOG_DIR} " " ${VOLUME_DIR} " " ${ARTIFACT_DIR} " " ${HOME} " ; do
166
- ${USE_SUDO: +sudo} rm -rf " ${directory} "
167
- mkdir -p " ${directory} "
168
- done
149
+ export OS_TMP_ENV_SET=" ${sub_dir} "
169
150
}
170
151
readonly -f os::util::environment::setup_tmpdir_vars
171
152
0 commit comments