don't ask for network and source on booted system'

This commit is contained in:
Tobias Powalowski 2023-01-22 20:55:28 +01:00
parent a89f85dfd8
commit 7b5248901b
2 changed files with 10 additions and 2 deletions

View file

@ -133,9 +133,11 @@ _select_source() {
if [[ -z ${_S_NET} ]]; then
_check_network || return 1
fi
if [[ -z ${_S_SRC} ]]; then
[[ "${_RUNNING_ARCH}" == "x86_64" ]] && _enable_testing
_getsource || return 1
fi
fi
_NEXTITEM="3"
}

View file

@ -5,6 +5,12 @@ _net_interfaces() {
}
_check_network() {
if ! grep -qw '^archboot' /etc/hostname; then
if getent hosts www.google.com &>"${_LOG}"; then
_S_NET=1
_S_SRC=1
fi
fi
[[ -z "${_S_NET}" ]] && _donetwork
}