Skip to content

Commit 20b02fc

Browse files
authored
Merge pull request #221 from desultory/dev
reattempt livecd mounts on failure
2 parents 3a99706 + 217c717 commit 20b02fc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/ugrd/fs/livecd.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "desultory"
2-
__version__ = "0.6.0"
2+
__version__ = "0.7.0"
33

44
from zenlib.util import contains
55

@@ -13,13 +13,18 @@ def mount_livecd(self) -> str:
1313
Because this mount is made manulally, no mount entry/validation/unmounting is done
1414
All mount handling happens strictly at runtime
1515
"""
16-
return """
16+
return f"""
1717
livecd_label="$(readvar livecd_label)"
1818
if [ -z "$livecd_label" ]; then
1919
rd_fail "livecd_label must be set to the label of the livecd storage root."
2020
fi
2121
einfo "Mounting livecd with label: $livecd_label"
22-
mount LABEL="$livecd_label" /run/livecd || rd_fail "Failed to mount livecd with label: $livecd_label"
22+
while ! mount LABEL="$livecd_label" /run/livecd 2>/dev/null; do
23+
eerror "Failed to mount livecd with label: $livecd_label"
24+
if prompt_user "Press enter to break, waiting: {self["mount_timeout"]}s" {self["mount_timeout"]}; then
25+
rd_fail "Failed to mount livecd with label: $livecd_label"
26+
fi
27+
done
2328
"""
2429

2530

0 commit comments

Comments
 (0)