This repository was archived by the owner on Nov 30, 2023. It is now read-only.
File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
46
46
USERNAME=root
47
47
fi
48
48
49
+ USERHOME=" /home/$USERNAME "
50
+ if [ " $USERNAME " = " root" ]; then
51
+ USERHOME=" /root"
52
+ fi
53
+
54
+
49
55
# Get central common setting
50
56
get_common_setting () {
51
57
if [ " ${common_settings_file_loaded} " != " true" ]; then
158
164
kubectl completion bash > /etc/bash_completion.d/kubectl
159
165
160
166
# kubectl zsh completion
161
- mkdir -p " /home/${USERNAME} /.oh-my-zsh/completions"
162
- kubectl completion zsh > " /home/${USERNAME} /.oh-my-zsh/completions/_kubectl"
163
- chown -R " ${USERNAME} " " /home/${USERNAME} /.oh-my-zsh"
167
+ if [ -e " ${USERHOME} }/.oh-my-zsh" ]; then
168
+ mkdir -p " ${USERHOME} /.oh-my-zsh/completions"
169
+ kubectl completion zsh > " ${USERHOME} /.oh-my-zsh/completions/_kubectl"
170
+ chown -R " ${USERNAME} " " ${USERHOME} /.oh-my-zsh"
171
+ fi
164
172
165
173
# Install Helm, verify signature and checksum
166
174
echo " Downloading Helm..."
@@ -228,6 +236,10 @@ if [ "${MINIKUBE_VERSION}" != "none" ]; then
228
236
echo ' (!) minikube installation failed!'
229
237
exit 1
230
238
fi
239
+ # Create minkube folder with correct privs in case a volume is mounted here
240
+ mkdir -p " ${USERHOME} /.minikube"
241
+ chown -R $USERNAME " ${USERHOME} /.minikube"
242
+ chmod -R u+wrx " ${USERHOME} /.minikube"
231
243
fi
232
244
233
245
if ! type docker > /dev/null 2>&1 ; then
You can’t perform that action at this time.
0 commit comments