Skip to content

Commit

Permalink
pxe pause: wait for "continue" instead of [enter]
Browse files Browse the repository at this point in the history
  • Loading branch information
pogobanane committed Jun 27, 2023
1 parent b36be63 commit a694b3e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nixos-anywhere-pxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,14 @@ def build_pxe_image(netboot_image_flake: str) -> Path:
)
return Path(res.stdout.strip())


def pause():
print("")
input(
"Press [enter] to terminate this script and tear down the network to the server."
)
# no clue how to flush stdin with python. Gonna wait for a specific string instead (as opposed to wait for [enter]).
answer = ""
while (answer != "continue"):
answer = input(
"Answer 'continue' to terminate this script and tear down the network to the server: "
)


def dispatch_dnsmasq(
Expand Down

0 comments on commit a694b3e

Please sign in to comment.