18870: Handle possibly undefined command line parameters
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 30 Jun 2022 17:21:26 +0000 (13:21 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 30 Jun 2022 17:21:26 +0000 (13:21 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

tools/salt-install/installer.sh

index 238efe86844ae2bdb130ca02de920dc804698fdd..35a194af4e42dd978ce987f919354bcc602a5bd9 100755 (executable)
@@ -116,9 +116,11 @@ case "$subcmd" in
            exit
        fi
 
            exit
        fi
 
+       set +u
        SETUPDIR=$1
        PARAMS=$2
        SLS=$3
        SETUPDIR=$1
        PARAMS=$2
        SLS=$3
+       set -u
 
        err=
        if [[ -z "$PARAMS" || ! -f local.params.example.$PARAMS ]] ; then
 
        err=
        if [[ -z "$PARAMS" || ! -f local.params.example.$PARAMS ]] ; then
@@ -156,7 +158,9 @@ case "$subcmd" in
        echo "setup directory initialized, now go to $SETUPDIR, edit '${CONFIG_FILE}' and '${CONFIG_DIR}' as needed, then run 'installer.sh deploy'"
        ;;
     deploy)
        echo "setup directory initialized, now go to $SETUPDIR, edit '${CONFIG_FILE}' and '${CONFIG_DIR}' as needed, then run 'installer.sh deploy'"
        ;;
     deploy)
+       set +u
        NODE=$1
        NODE=$1
+       set -u
 
        loadconfig
 
 
        loadconfig
 
@@ -218,7 +222,9 @@ case "$subcmd" in
     diagnostics)
        loadconfig
 
     diagnostics)
        loadconfig
 
+       set +u
        declare LOCATION=$1
        declare LOCATION=$1
+       set -u
 
        if ! which arvados-client ; then
            echo "arvados-client not found, install 'arvados-client' package with 'apt-get' or 'yum'"
 
        if ! which arvados-client ; then
            echo "arvados-client not found, install 'arvados-client' package with 'apt-get' or 'yum'"