Add automount path fix

This commit is contained in:
Arnie 2018-08-22 08:50:21 +02:00
parent 11eec3138e
commit 57f420e0e0

View File

@ -221,6 +221,24 @@ installDockerCompose() {
return 0 return 0
} }
mapAutomountPaths() {
local continue
echo "Are you running windows version 18.03 or later? y/[n]"
read continue
[[ "${continue}" != "" ]] && [[ "${continue}" != "y" ]] && [[ "${continue}" != "Y" ]] && return 0
cat << EOF | sudo tee /etc/wsl.conf > /dev/null
[automount]
root = /
options = "metadata"
EOF
echo "Please restart your computer, after the restart the volumes will be mounted in /c/, /d/, etc. instead of /mnt/c/, /mnt/d/..."
}
initialize() { initialize() {
installDocker installDocker
[[ $? -ne 0 ]] && echo "Could not install Docker" && return 137 [[ $? -ne 0 ]] && echo "Could not install Docker" && return 137
@ -237,6 +255,9 @@ initialize() {
installDockerCompose installDockerCompose
[[ $? -ne 0 ]] && echo "Could not install docker compose" && return 137 [[ $? -ne 0 ]] && echo "Could not install docker compose" && return 137
mapAutomountPaths
[[ $? -ne 0 ]] && echo "Could not map the volume paths properly" && return 137
return 0 return 0
} }