Skip to content

Commit

Permalink
Merge pull request #160 from numtide/zfs-optional
Browse files Browse the repository at this point in the history
skip zpool command if we don't have it installed
  • Loading branch information
mergify[bot] authored Jul 18, 2023
2 parents c40492c + a9e9b70 commit 11d3803
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ 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
if command -v zpool >/dev/null; then
zpool export -a || : # we always want to export the zfs pools so people can boot from it without force import
fi
# 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 &
Expand Down

0 comments on commit 11d3803

Please sign in to comment.