mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 19:46:31 +01:00
fix(network): deterministically restore qemu networking before src_get downloads
This commit is contained in:
parent
0669db4e72
commit
893a320f6f
2 changed files with 30 additions and 0 deletions
|
|
@ -277,6 +277,20 @@ randomize() {
|
|||
fi
|
||||
}
|
||||
|
||||
ensure_network_ready() {
|
||||
if [ "${NETWORK_READY}" = "True" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Resumed QEMU boots (e.g. from stage0-work.img) can lose configured links.
|
||||
# Bring the interface up deterministically before any source download.
|
||||
if [ "${QEMU}" = "True" ] && [ "${CHROOT}" != "True" ]; then
|
||||
dhcpcd --waitip=4
|
||||
fi
|
||||
|
||||
NETWORK_READY=True
|
||||
}
|
||||
|
||||
download_source_line() {
|
||||
upstream_url="${1}"
|
||||
checksum="${2}"
|
||||
|
|
@ -330,6 +344,7 @@ source_line_action() {
|
|||
|
||||
# Default get function that downloads source tarballs.
|
||||
default_src_get() {
|
||||
ensure_network_ready
|
||||
# shellcheck disable=SC2153
|
||||
cd "${DISTFILES}"
|
||||
# shellcheck disable=SC2162
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue