Skip to content

Commit ad954de

Browse files
bors[bot]Mic92
andauthored
Merge #77
77: wait for machine to be shutdown after deploy r=Lassulus a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2 parents b7e335a + 5be3e00 commit ad954de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/nixos-anywhere.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,8 @@ nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
321321
# This makes integration into scripts easier
322322
nohup bash -c '${maybe_reboot}' >/dev/null &
323323
SSH
324+
325+
# wait for machine to become unreachable due to reboot
326+
if [[ -n ${maybe_reboot} ]]; then
327+
while timeout_ssh_ -- exit 0; do sleep 1; done
328+
fi

0 commit comments

Comments
 (0)