Prevent variable splitting in wsl check and improve error message

This commit is contained in:
Tobias Kussel 2023-02-24 11:41:05 +01:00
parent 7a350a8c9b
commit bfc00b9967
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ log "INFO" "Preparing your system for bridgehead installation ..."
# Check, if running in WSL # Check, if running in WSL
if [[ $(grep -i Microsoft /proc/version) ]]; then if [[ $(grep -i Microsoft /proc/version) ]]; then
# Check, if systemd is available # Check, if systemd is available
if [ $(systemctl is-system-running) = "offline" ]; then if [ "$(systemctl is-system-running)" = "offline" ]; then
log "ERROR" "It seems, that you have no active systemd environment in your WSL. Please follow the guide in https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/" log "ERROR" "It seems you have no active systemd environment in your WSL environment. Please follow the guide in https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/"
exit 1 exit 1
fi fi
fi fi