From 0263a8f86064a9d02e8b4eb8fa8839dfec2b087f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 24 Aug 2014 12:27:32 +0200 Subject: [PATCH] NixOS containers: Use exit status 133 for reboots --- nixos/modules/virtualisation/containers.nix | 5 ++++- pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 292b96e6eb2..ca3de4089d2 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -267,9 +267,12 @@ in NotifyAccess = "all"; - # Note that on reboot, systemd-nspawn returns 10, so this + # Note that on reboot, systemd-nspawn returns 133, so this # unit will be restarted. On poweroff, it returns 0, so the # unit won't be restarted. + RestartForceExitStatus = "133"; + SuccessExitStatus = "133"; + Restart = "on-failure"; # Hack: we don't want to kill systemd-nspawn, since we call diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4f275e3c6e..e2f11d0b135 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7785,6 +7785,10 @@ let linuxHeaders = linuxHeaders_3_14; }; + systemd_test = callPackage ../os-specific/linux/systemd/test.nix { + linuxHeaders = linuxHeaders_3_14; + }; + systemtap = callPackage ../development/tools/profiling/systemtap { inherit (gnome) libglademm; };