about summary refs log tree commit diff
path: root/scripts/install-multi-user.sh
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2019-03-27T01·08-0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2019-03-27T01·08-0400
commitd854e7dfd6d512c8ed687b61d7aae3358eda71cd (patch)
tree6b404fe17ac0ae6bf418aef13cf716e0ad8a0d25 /scripts/install-multi-user.sh
parent6e9e34ea1faac175b787734151f44a662ed57241 (diff)
install-multi-user: Detect and fail lack of systemd separately
Otherwise, the user is shown:

```
Sorry, I don't know what to do on Linux
```

Which is... not exactly right.
Diffstat (limited to 'scripts/install-multi-user.sh')
-rw-r--r--scripts/install-multi-user.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh
index 4b65783a20ff..80d1c73fbb4d 100644
--- a/scripts/install-multi-user.sh
+++ b/scripts/install-multi-user.sh
@@ -753,9 +753,13 @@ main() {
     if [ "$(uname -s)" = "Darwin" ]; then
         # shellcheck source=./install-darwin-multi-user.sh
         . "$EXTRACTED_NIX_PATH/install-darwin-multi-user.sh"
-    elif [ "$(uname -s)" = "Linux" ] && [ -e /run/systemd/system ]; then
-        # shellcheck source=./install-systemd-multi-user.sh
-        . "$EXTRACTED_NIX_PATH/install-systemd-multi-user.sh"
+    elif [ "$(uname -s)" = "Linux" ]; then
+        if [ -e /run/systemd/system ]; then
+            # shellcheck source=./install-systemd-multi-user.sh
+            . "$EXTRACTED_NIX_PATH/install-systemd-multi-user.sh"
+        else
+            failure "Sorry, the multi-user installation requires systemd on Linux (detected using /run/systemd/system)"
+        fi
     else
         failure "Sorry, I don't know what to do on $(uname)"
     fi