mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 16:45:28 +03:00
Merge #33
33: perform reboot in the background r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
commit
066d9d84ec
@ -36,7 +36,7 @@ abort() {
|
||||
|
||||
kexec_url=https://github.com/nix-community/nixos-images/releases/download/nixos-22.11/nixos-kexec-installer-x86_64-linux.tar.gz
|
||||
enable_debug=""
|
||||
maybereboot="reboot"
|
||||
maybereboot="sleep 6 && reboot"
|
||||
|
||||
declare -A disk_encryption_keys
|
||||
|
||||
@ -252,5 +252,7 @@ set -efu ${enable_debug}
|
||||
# needed for installation if initrd-secrets are used
|
||||
mkdir -m777 -p /mnt/tmp
|
||||
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
|
||||
${maybereboot}
|
||||
# We will reboot in background so we can cleanly finish the script before the hosts go down.
|
||||
# This makes integration into scripts easier
|
||||
nohup bash -c '${maybereboot}' >/dev/null &
|
||||
SSH
|
||||
|
Loading…
Reference in New Issue
Block a user