cli: read current-system rev from /run/

This commit is contained in:
Sean Buckley 2021-12-20 00:07:30 -05:00
parent d95f687c26
commit 7ab3d482c7

View file

@ -48,8 +48,8 @@
(writeShellScriptBin "nixos-check-reboot" ''
set -e
booted="$(readlink /run/booted-system/kernel)"
built="$(readlink /nix/var/nix/profiles/system/kernel)"
if [ "$booted" = "$built" ]
current="$(readlink /run/current-system/kernel)"
if [ "$booted" = "$current" ]
then
echo OK
exit 0