From be223fbad88dab5e7b46e52aee60fb43b8ea6681 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Thu, 3 Jun 2021 23:59:17 -0400 Subject: [PATCH] change reboot check --- modules/cli.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/cli.nix b/modules/cli.nix index 42d9075..2594564 100644 --- a/modules/cli.nix +++ b/modules/cli.nix @@ -58,7 +58,14 @@ in set -e booted="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})" built="$(readlink /nix/var/nix/profiles/system/{initrd,kernel,kernel-modules})" - [ "$booted" = "$built" ] + if [ "$booted" = "$built" ] + then + echo OK + exit 0 + else + echo REBOOT NEEDED + exit 1 + fi '') (writeScriptBin "zfsram" ''