File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ abort() {
36
36
37
37
kexec_url=https://github.com/nix-community/nixos-images/releases/download/nixos-22.11/nixos-kexec-installer-x86_64-linux.tar.gz
38
38
enable_debug=" "
39
- maybereboot=" reboot"
39
+ maybereboot=" sleep 6 && reboot"
40
40
41
41
declare -A disk_encryption_keys
42
42
@@ -252,5 +252,7 @@ set -efu ${enable_debug}
252
252
# needed for installation if initrd-secrets are used
253
253
mkdir -m777 -p /mnt/tmp
254
254
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system "
255
- ${maybereboot}
255
+ # We will reboot in background so we can cleanly finish the script before the hosts go down.
256
+ # This makes integration into scripts easier
257
+ nohup bash -c '${maybereboot} ' >/dev/null &
256
258
SSH
You can’t perform that action at this time.
0 commit comments