hosts: use system profile to detect kernel updates
This commit is contained in:
parent
4bec53ce01
commit
98903689b5
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ in
|
||||||
'';
|
'';
|
||||||
in pkgs.writeShellScript "post-effect.sh" ''
|
in pkgs.writeShellScript "post-effect.sh" ''
|
||||||
export PATH="${pkgs.consul}/bin:${pkgs.coreutils}/bin"
|
export PATH="${pkgs.consul}/bin:${pkgs.coreutils}/bin"
|
||||||
if [[ "$(realpath /run/booted-system/kernel)" != "$(realpath /run/current-system/kernel)" ]]; then
|
if [[ "$(realpath /run/booted-system/kernel)" != "$(realpath /nix/var/nix/profiles/system/kernel)" ]]; then
|
||||||
echo "Scheduling reboot for kernel upgrade"
|
echo "Scheduling reboot for kernel upgrade"
|
||||||
if ! consul members >/dev/null; then
|
if ! consul members >/dev/null; then
|
||||||
echo "Consul not active, skipping reboot"
|
echo "Consul not active, skipping reboot"
|
||||||
|
|
Loading…
Reference in a new issue