aboutsummaryrefslogtreecommitdiff
path: root/scripts/install-systemd-multi-user.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-09-15 20:33:44 +0200
committerGitHub <noreply@github.com>2021-09-15 20:33:44 +0200
commit79152e307e7eef667c3de9c21571d017654a7c32 (patch)
tree67fd413bcf0b42c5ada7eddc41a04f7bd99df3a8 /scripts/install-systemd-multi-user.sh
parent7349f257da8278af9aae35544b15c9a204e2a57b (diff)
parent3b82c1a5fef521ebadea5df12384390c8c24100c (diff)
Merge pull request #5212 from mkenigs/auto-uid-allocation
Merge master into #3600
Diffstat (limited to 'scripts/install-systemd-multi-user.sh')
-rwxr-xr-xscripts/install-systemd-multi-user.sh48
1 files changed, 32 insertions, 16 deletions
diff --git a/scripts/install-systemd-multi-user.sh b/scripts/install-systemd-multi-user.sh
index e0201d53b..81c61b2a0 100755
--- a/scripts/install-systemd-multi-user.sh
+++ b/scripts/install-systemd-multi-user.sh
@@ -41,10 +41,8 @@ handle_network_proxy() {
fi
}
-poly_validate_assumptions() {
- if [ "$(uname -s)" != "Linux" ]; then
- failure "This script is for use with Linux!"
- fi
+poly_cure_artifacts() {
+ :
}
poly_service_installed_check() {
@@ -72,24 +70,38 @@ poly_service_setup_note() {
EOF
}
-poly_configure_nix_daemon_service() {
- _sudo "to set up the nix-daemon service" \
- systemctl link "/nix/var/nix/profiles/default$SERVICE_SRC"
+poly_extra_try_me_commands() {
+ if [ -e /run/systemd/system ]; then
+ :
+ else
+ cat <<EOF
+ $ sudo nix-daemon
+EOF
+ fi
+}
- _sudo "to set up the nix-daemon socket service" \
- systemctl enable "/nix/var/nix/profiles/default$SOCKET_SRC"
+poly_configure_nix_daemon_service() {
+ if [ -e /run/systemd/system ]; then
+ task "Setting up the nix-daemon systemd service"
+ _sudo "to set up the nix-daemon service" \
+ systemctl link "/nix/var/nix/profiles/default$SERVICE_SRC"
- handle_network_proxy
+ _sudo "to set up the nix-daemon socket service" \
+ systemctl enable "/nix/var/nix/profiles/default$SOCKET_SRC"
- _sudo "to load the systemd unit for nix-daemon" \
- systemctl daemon-reload
+ handle_network_proxy
- _sudo "to start the nix-daemon.socket" \
- systemctl start nix-daemon.socket
+ _sudo "to load the systemd unit for nix-daemon" \
+ systemctl daemon-reload
- _sudo "to start the nix-daemon.service" \
- systemctl restart nix-daemon.service
+ _sudo "to start the nix-daemon.socket" \
+ systemctl start nix-daemon.socket
+ _sudo "to start the nix-daemon.service" \
+ systemctl restart nix-daemon.service
+ else
+ reminder "I don't support your init system yet; you may want to add nix-daemon manually."
+ fi
}
poly_group_exists() {
@@ -186,3 +198,7 @@ poly_create_build_user() {
--password "!" \
"$username"
}
+
+poly_prepare_to_install() {
+ :
+}