mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add network check before overwriting files with empty files
This commit is contained in:
parent
e847b9122a
commit
4c65c6b117
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,10 @@ _clean_kernel_cache () {
|
|||
_download_latest() {
|
||||
# Download latest setup and quickinst script from git repository
|
||||
if [[ "${_D_SCRIPTS}" == "1" ]]; then
|
||||
if ! ping -c1 www.google.com; then
|
||||
echo -e "\033[91mError: Network not yet ready, aborting!\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\033[1mStart:\033[0m Downloading latest km, tz, quickinst, setup and helpers..."
|
||||
[[ -d "${_INST}" ]] || mkdir "${_INST}"
|
||||
wget -q "${_SOURCE}${_ETC}/defaults?inline=false" -O "${_ETC}/defaults"
|
||||
|
|
Loading…
Reference in a new issue