Merge pull request #157 from numtide/zfs_export

export zfs pool after installation
This commit is contained in:
mergify[bot] 2023-07-18 12:31:24 +00:00 committed by GitHub
commit c40492c80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,6 +423,7 @@ export PATH=\$PATH:/run/current-system/sw/bin
mkdir -p /mnt/tmp
chmod 777 /mnt/tmp
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
zpool export -a || : # we always want to export the zfs pools so people can boot from it without force import
# 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 '${maybe_reboot}' >/dev/null &