File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -753,17 +753,24 @@ if [ ! -z ${NIXOS_NO_CHECK+0} ]; then
753
753
export NIXOS_NO_CHECK
754
754
fi
755
755
nixos-install --no-root-passwd --no-channel-copy --system "$nixosSystem "
756
- if [ ${phases[reboot]} == 1 ]; then
756
+ SSH
757
+
758
+ }
759
+
760
+ nixosReboot () {
761
+ step Rebooting
762
+ runSsh sh << SSH
757
763
if command -v zpool >/dev/null && [ "\$ (zpool list)" != "no pools available" ]; then
758
764
# we always want to export the zfs pools so people can boot from it without force import
759
765
umount -Rv /mnt/
760
766
swapoff -a
761
767
zpool export -a || true
762
768
fi
763
769
nohup sh -c 'sleep 6 && reboot' >/dev/null &
764
- fi
765
770
SSH
766
771
772
+ step Waiting for the machine to become unreachable due to reboot
773
+ while runSshTimeout -- exit 0; do sleep 1; done
767
774
}
768
775
769
776
main () {
@@ -884,8 +891,7 @@ main() {
884
891
fi
885
892
886
893
if [[ ${phases[reboot]} == 1 ]]; then
887
- step Waiting for the machine to become unreachable due to reboot
888
- while runSshTimeout -- exit 0; do sleep 1; done
894
+ nixosReboot
889
895
fi
890
896
891
897
step " Done!"
You can’t perform that action at this time.
0 commit comments