From 389d606628fe8459dc0024b9fbb3cf819e34e40b Mon Sep 17 00:00:00 2001 From: natemaia Date: Tue, 29 Dec 2020 17:38:31 -0800 Subject: [PATCH] Add new flag to disable network checks --- installer | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/installer b/installer index 507ebe9..f56c9b5 100755 --- a/installer +++ b/installer @@ -6,7 +6,7 @@ # AIF, Calamares, and the Arch Wiki.. Credit where credit is due # shellcheck disable=SC2086,SC2046,SC2254,SC2164 -VER=2.3 +VER=2.4 # default values { @@ -3118,6 +3118,7 @@ usage() -h print this message and exit -l install and setup a live session -D enable xtrace and log output to $DBG + -c disable network connection tests -m set the mountpoint used for the new installation -d set the distribution name for the installed system -n no partitioning, mounting, or formatting (self mount) @@ -3423,7 +3424,7 @@ chk_connect() net_connect() { - if chk_connect; then + if [[ $NONET ]] || chk_connect; then return 0 elif hash nmtui > /dev/null 2>&1; then tput civis @@ -3519,7 +3520,7 @@ fi 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 D) debug ;; h) usage "$0" ;; @@ -3527,6 +3528,7 @@ while getopts ":htl:Dnr:b:m:d:" OPT; do t) TEARFREE=true ;; m) MNT="$OPTARG" ;; d) DIST="$OPTARG" ;; + c) NONET=true ;; r) 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