From 45f0de21f0118f743e486daa1fa1b311a9355afd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 21 Dec 2012 00:14:13 +0100 Subject: [PATCH] nixos-rebuild: Fix the check for running nix-daemon --- modules/installer/tools/nixos-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/installer/tools/nixos-rebuild.sh b/modules/installer/tools/nixos-rebuild.sh index 01665e277b6d..66acf9087106 100644 --- a/modules/installer/tools/nixos-rebuild.sh +++ b/modules/installer/tools/nixos-rebuild.sh @@ -115,7 +115,7 @@ trap 'rm -rf "$tmpDir"' EXIT # This matters if the new Nix in Nixpkgs has a schema change. It # would upgrade the schema, which should only happen once we actually # switch to the new configuration. -if initctl status nix-daemon 2>&1 | grep -q 'running'; then +if systemctl show nix-daemon.socket nix-daemon.service | grep -q ActiveState=active; then export NIX_REMOTE=${NIX_REMOTE:-daemon} fi