This repository was archived by the owner on Nov 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 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
4646 USERNAME=root
4747fi
4848
49+ USERHOME=" /home/$USERNAME "
50+ if [ " $USERNAME " = " root" ]; then
51+ USERHOME=" /root"
52+ fi
53+
54+
4955# Get central common setting
5056get_common_setting () {
5157 if [ " ${common_settings_file_loaded} " != " true" ]; then
158164kubectl completion bash > /etc/bash_completion.d/kubectl
159165
160166# 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
164172
165173# Install Helm, verify signature and checksum
166174echo " Downloading Helm..."
@@ -228,6 +236,10 @@ if [ "${MINIKUBE_VERSION}" != "none" ]; then
228236 echo ' (!) minikube installation failed!'
229237 exit 1
230238 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"
231243fi
232244
233245if ! type docker > /dev/null 2>&1 ; then
You can’t perform that action at this time.
0 commit comments