Change network check from curl pipeline to simple ping command
This commit is contained in:
parent
343e9d88b1
commit
c023609a6b
@ -8,7 +8,7 @@
|
|||||||
# check for syntax errors
|
# check for syntax errors
|
||||||
# set -n
|
# set -n
|
||||||
|
|
||||||
VER=2.1.13
|
VER=2.1.14
|
||||||
|
|
||||||
# default values {
|
# default values {
|
||||||
|
|
||||||
@ -2497,7 +2497,7 @@ umount_dir()
|
|||||||
chk_connect()
|
chk_connect()
|
||||||
{
|
{
|
||||||
msg "Network Connect" "\nVerifying network connection\n" 0
|
msg "Network Connect" "\nVerifying network connection\n" 0
|
||||||
curl -sIN --connect-timeout 15 'https://www.archlinux.org/' | sed '1q' | grep -q '200'
|
ping -qc1 'archlinux.org' > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
net_connect()
|
net_connect()
|
||||||
@ -2507,9 +2507,9 @@ net_connect()
|
|||||||
elif hash nmtui > /dev/null 2>&1; then
|
elif hash nmtui > /dev/null 2>&1; then
|
||||||
tput civis
|
tput civis
|
||||||
if [[ $TERM == 'linux' ]]; then
|
if [[ $TERM == 'linux' ]]; then
|
||||||
printf "%b" "\e]P1191919" "\e]P4191919"
|
printf "%b" "\e]P1191919" "\e]P4191919" # fix up the nasty default colours of nmtui
|
||||||
nmtui-connect
|
nmtui-connect
|
||||||
printf "%b" "\e]P1D15355" "\e]P4255a9b"
|
printf "%b" "\e]P1D15355" "\e]P4255a9b" # restore defaults
|
||||||
else
|
else
|
||||||
nmtui-connect
|
nmtui-connect
|
||||||
fi
|
fi
|
||||||
@ -2591,7 +2591,7 @@ termcol
|
|||||||
|
|
||||||
# ensure the required packages are installed and that we're running as root on x86_64 architecture
|
# ensure the required packages are installed and that we're running as root on x86_64 architecture
|
||||||
if ! hash dialog rsync find parted curl arch-chroot >/dev/null 2>&1; then
|
if ! hash dialog rsync find parted curl arch-chroot >/dev/null 2>&1; then
|
||||||
printf "One or more of the required packages is missing: dialog, curl, rsync, parted, findutils, arch-install-scripts"
|
printf "One or more required packages are missing: dialog, curl, rsync, parted, findutils, arch-install-scripts"
|
||||||
die 1
|
die 1
|
||||||
elif (( UID != 0 )); then
|
elif (( UID != 0 )); then
|
||||||
msg "Not Root" "\nThis installer must be run as root or using sudo.\n\nExiting..\n" 2
|
msg "Not Root" "\nThis installer must be run as root or using sudo.\n\nExiting..\n" 2
|
||||||
|
Reference in New Issue
Block a user