Add new flag to disable network checks

This commit is contained in:
natemaia 2020-12-29 17:38:31 -08:00
parent 0745aac954
commit 389d606628

View File

@ -6,7 +6,7 @@
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due # AIF, Calamares, and the Arch Wiki.. Credit where credit is due
# shellcheck disable=SC2086,SC2046,SC2254,SC2164 # shellcheck disable=SC2086,SC2046,SC2254,SC2164
VER=2.3 VER=2.4
# default values { # default values {
@ -3118,6 +3118,7 @@ usage()
-h print this message and exit -h print this message and exit
-l install and setup a live session -l install and setup a live session
-D enable xtrace and log output to $DBG -D enable xtrace and log output to $DBG
-c disable network connection tests
-m set the mountpoint used for the new installation -m set the mountpoint used for the new installation
-d set the distribution name for the installed system -d set the distribution name for the installed system
-n no partitioning, mounting, or formatting (self mount) -n no partitioning, mounting, or formatting (self mount)
@ -3423,7 +3424,7 @@ chk_connect()
net_connect() net_connect()
{ {
if chk_connect; then if [[ $NONET ]] || chk_connect; then
return 0 return 0
elif hash nmtui > /dev/null 2>&1; then elif hash nmtui > /dev/null 2>&1; then
tput civis tput civis
@ -3519,7 +3520,7 @@ fi
trap 'printf "\n^C\n" && die 1' INT trap 'printf "\n^C\n" && die 1' INT
while getopts ":htl:Dnr:b:m:d:" OPT; do while getopts ":htcnrD:b:m:d:l:" OPT; do
case "$OPT" in case "$OPT" in
D) debug ;; D) debug ;;
h) usage "$0" ;; h) usage "$0" ;;
@ -3527,6 +3528,7 @@ while getopts ":htl:Dnr:b:m:d:" OPT; do
t) TEARFREE=true ;; t) TEARFREE=true ;;
m) MNT="$OPTARG" ;; m) MNT="$OPTARG" ;;
d) DIST="$OPTARG" ;; d) DIST="$OPTARG" ;;
c) NONET=true ;;
r) r)
if [[ ! -b $OPTARG ]]; then if [[ ! -b $OPTARG ]]; then
msg "Invalid Root" "\nThe installer expects a full path to a block device for root, e.g. /dev/sda2.\n\nExiting..\n" 2 msg "Invalid Root" "\nThe installer expects a full path to a block device for root, e.g. /dev/sda2.\n\nExiting..\n" 2