diff --git a/wsl-oobe.sh b/wsl-oobe.sh index ace2e51..240dde6 100644 --- a/wsl-oobe.sh +++ b/wsl-oobe.sh @@ -2,7 +2,8 @@ # The Fedora WSL out of box experience script. # -# This command runs the first time the user opens an interactive shell. +# This command runs the first time the user opens an interactive shell if +# `cloud-init` is not enabled. # # A non-zero exit code indicates to WSL that setup failed. @@ -10,6 +11,10 @@ set -ueo pipefail DEFAULT_USER_ID=1000 +if systemctl is-enabled cloud-init.service > /dev/null ; then + exit 0 +fi + echo 'Please create a default user account. The username does not need to match your Windows username.' echo 'For more information visit: https://aka.ms/wslusers'