]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
[componentMgr] salt-minion - update integration script to version 2024.12.05
authorKruti Pendharkar <kp025370@broadcom.com>
Tue, 18 Feb 2025 09:13:56 +0000 (01:13 -0800)
committerKruti Pendharkar <kp025370@broadcom.com>
Tue, 18 Feb 2025 09:13:56 +0000 (01:13 -0800)
svtminion:
New release (2024.12.05) of the salt-minion integration script.
o Supports the new repository locations at packages.broadcom.com.
o Only supports Salt 3006 and higher with new Broadcom infrastructure.
o New return code 107 (Installed but Stopped); used when the service is
installed but stopped. Added to help with customer case where the service
remains 'not running' due to user action.
NOTE: Fixed line 31 apostrophe being an unicode homoglyph in svtminion.ps1
validated the downloaded files sha256 before that change.

componentMgr:
Update component manager to support the new return code 107.
return code: 107
string id: INSTALLEDSTOPPED
string message: Installed but Stopped.

open-vm-tools/services/plugins/componentMgr/componentMgrInstallAction.c
open-vm-tools/services/plugins/componentMgr/componentMgrPlugin.h
open-vm-tools/services/plugins/componentMgr/componentMgrUtil.c
open-vm-tools/services/plugins/componentMgr/svtminion.sh

index ff858884444b13554fca1f4b139f2165746cd473..e051f41a47995b751b02d49eef4f126f7ad4a63c 100644 (file)
@@ -1,5 +1,6 @@
 /*********************************************************
- * Copyright (c) 2021-2023 VMware, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Broadcom. All Rights Reserved.
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -16,6 +17,7 @@
  *
  *********************************************************/
 
+
 /*
  * componentMgrInstallAction.c --
  *
@@ -736,7 +738,8 @@ ComponentMgr_ExecuteComponentAction(int componentIndex) // IN
    } else if((Str_Strcmp(action, COMPONENTMGR_COMPONENTABSENT) == 0) &&
              (components[componentIndex].status == INSTALLED ||
              components[componentIndex].status == INSTALLFAILED ||
-             components[componentIndex].status == REMOVEFAILED)) {
+             components[componentIndex].status == REMOVEFAILED ||
+             components[componentIndex].status == INSTALLEDSTOPPED)) {
       installaction = ABSENT;
    } else {
       g_debug("%s: Action %s will not be executed for component %s with "
@@ -1031,7 +1034,7 @@ ComponentMgrCheckExecuteComponentAction(ToolsAppCtx *ctx,   // IN
     * Add the component to the guest only if it is NOTINSTALLED,
     * INSTALLFAILED or REMOVEFAILED.
     * Remove the component on the guest only if it is INSTALLED,
-    * INSTALLFAILED or REMOVEFAILED.
+    * INSTALLFAILED, REMOVEFAILED or INSTALLEDSTOPPED.
     */
    if((Str_Strcmp(action, COMPONENTMGR_COMPONENTPRESENT) == 0) &&
       (components[componentIndex].status == NOTINSTALLED ||
@@ -1041,7 +1044,8 @@ ComponentMgrCheckExecuteComponentAction(ToolsAppCtx *ctx,   // IN
    } else if((Str_Strcmp(action, COMPONENTMGR_COMPONENTABSENT) == 0) &&
              (components[componentIndex].status == INSTALLED ||
              components[componentIndex].status == INSTALLFAILED ||
-             components[componentIndex].status == REMOVEFAILED)) {
+             components[componentIndex].status == REMOVEFAILED ||
+             components[componentIndex].status == INSTALLEDSTOPPED)) {
       installaction = ABSENT;
    } else {
       components[componentIndex].statuscount -= 1;
index 2454ef450fc57cac76b97bd7cc5d5f30e58669c8..0d5551bc7485ff6170bb5c85f3ad5c67cfd1c668 100644 (file)
@@ -1,5 +1,6 @@
 /*********************************************************
- * Copyright (c) 2021,2023 VMware, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Broadcom. All Rights Reserved.
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -202,6 +203,9 @@ typedef enum InstallStatus
                              * is not managed (or manageable), through the
                              * component manager plugin.
                              */
+   INSTALLEDSTOPPED,        /* The component is installed on the guest OS; but
+                             * is stopped.
+                             */
    SCRIPTFAILED = 126,      /* The component script failed for some reason. */
    SCRIPTTERMINATED = 130   /* The component script terminated for some reason.
                              */
index 0828cb5c55dd1031151ebe817e3eaa237b012aa8..c291ace21fc12b9bd0fe3475727c4d80476d317b 100644 (file)
@@ -1,5 +1,6 @@
 /*********************************************************
- * Copyright (c) 2021,2023 VMware, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Broadcom. All Rights Reserved.
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -116,6 +117,7 @@ ComponentMgr_GetComponentInstallStatus(InstallStatus installStatus) // IN
       case INSTALLFAILED:     return "INSTALLFAILED";
       case REMOVEFAILED:      return "REMOVEFAILED";
       case UNMANAGED:         return "UNMANAGED";
+      case INSTALLEDSTOPPED:  return "INSTALLEDSTOPPED";
       case SCRIPTFAILED:      return "SCRIPTFAILED";
       case SCRIPTTERMINATED:  return "SCRIPTTERMINATED";
    }
index 7c99a04a4970cbf83c832f337c5f326c5dd9f7cb..e0b6bf4fc772fc1cea689b66e537739cd860936f 100644 (file)
@@ -1,6 +1,6 @@
-#!/usr/bin/env bash
+#!/bin/bash
 
-# Copyright 2021-2023 VMware, Inc.
+# Copyright 2021-2024 Broadcom Inc.
 # SPDX-License-Identifier: Apache-2
 
 ## Salt VMware Tools Integration script
@@ -19,23 +19,23 @@ set -o pipefail
 # using bash for now
 # run this script as root, as needed to run Salt
 
-## readonly SCRIPT_VERSION='SCRIPT_VERSION_REPLACE'
-readonly SCRIPT_VERSION="1.6"
+readonly SCRIPT_VERSION="2024.12.05"
 
 # definitions
 
-CURL_DOWNLOAD_RETRY_COUNT=5
-
 ## Repository locations and naming
 readonly default_salt_url_version="latest"
-readonly salt_name="salt"
-readonly repo_json_file="repo.json"
 salt_url_version="${default_salt_url_version}"
-pre_3006_base_url="https://repo.saltproject.io/salt/vmware-tools-onedir"
-# Release
-post_3005_base_url="https://repo.saltproject.io/salt/py3/onedir"
+salt_specific_version=""
+
+readonly salt_name="salt"
 base_url=""
 
+# Broadcom infrastructure
+bd_3006_base_url="https://packages.broadcom.com/artifactory/saltproject-generic/onedir"
+bd_3006_chksum_base_url="https://packages.broadcom.com/artifactory/api/storage/saltproject-generic/onedir"
+
+
 # Salt file and directory locations
 readonly base_salt_location="/opt/saltstack"
 readonly salt_dir="${base_salt_location}/${salt_name}"
@@ -62,15 +62,17 @@ ${list_files_systemd_to_remove}
 "
 ## /var/log/vmware-${SCRIPTNAME}-*
 
+# some docker containers don't include 'find' - RHEL 8 equivalents
 readonly salt_dep_file_list="systemctl
 curl
-sha512sum
+sha256sum
 vmtoolsd
 grep
 awk
 sed
 cut
 wget
+find
 "
 
 readonly allowed_log_file_action_names="status
@@ -78,6 +80,7 @@ depend
 install
 clear
 remove
+reconfig
 default
 "
 
@@ -86,7 +89,7 @@ call
 "
 
 readonly salt_minion_service_wrapper=\
-"# Copyright 2021-2023 VMware, Inc.
+"# Copyright 2021-2024 VMware, Inc.
 # SPDX-License-Identifier: Apache-2
 
 [Unit]
@@ -138,13 +141,14 @@ declare -a m_cfg_values
 
 ## Component Manager Installer/Script return/exit status codes
 # return/exit Status codes
-#  100 + 0 => installed
+#  100 + 0 => installed (and running)
 #  100 + 1 => installing
 #  100 + 2 => notInstalled
 #  100 + 3 => installFailed
 #  100 + 4 => removing
 #  100 + 5 => removeFailed
 #  100 + 6 => externalInstall
+#  100 + 7 => installedStopped
 #  126 => scriptFailed
 #  130 => scriptTerminated
 declare -A STATUS_CODES_ARY
@@ -155,6 +159,7 @@ STATUS_CODES_ARY[installFailed]=103
 STATUS_CODES_ARY[removing]=104
 STATUS_CODES_ARY[removeFailed]=105
 STATUS_CODES_ARY[externalInstall]=106
+STATUS_CODES_ARY[installedStopped]=107
 STATUS_CODES_ARY[scriptFailed]=126
 STATUS_CODES_ARY[scriptTerminated]=130
 
@@ -184,6 +189,13 @@ INSTALL_PARAMS=""
 MINION_VERSION_FLAG=0
 MINION_VERSION_PARAMS=""
 
+RECONFIG_FLAG=0
+RECONFIG_PARAMS=""
+
+STOP_FLAG=0
+RESTART_FLAG=0
+UPGRADE_FLAG=0
+
 LOG_LEVEL_FLAG=0
 LOG_LEVEL_PARAMS=""
 
@@ -193,10 +205,6 @@ LOG_LEVEL=${LOG_LEVELS_ARY[warning]}
 SOURCE_FLAG=0
 SOURCE_PARAMS=""
 
-# Flag for pre_3006 and post_3005, 0 => pre_3006, 1 => post_3005
-POST_3005_FLAG=0
-POST_3005_MAJOR_VER_FLAG=0
-
 
 # helper functions
 
@@ -209,6 +217,7 @@ _log() {
         "${log_dir}/vmware-${SCRIPTNAME}-${LOG_ACTION}-${logdate}.log"
 }
 
+# shellcheck disable=SC2329
 _display() {
     if [[ ${VERBOSE_FLAG} -eq 1 ]]; then echo "$1"; fi
     _log "$*"
@@ -248,6 +257,7 @@ _debug_log() {
     fi
 }
 
+# shellcheck disable=SC2329
 _yesno() {
 read -r -p "Continue (y/n)?" choice
 case "$choice" in
@@ -269,7 +279,9 @@ esac
      echo "usage: ${0}"
      echo "             [-c|--clear] [-d|--depend] [-h|--help] [-i|--install]"
      echo "             [-j|--source] [-l|--loglevel] [-m|--minionversion]"
-     echo "             [-r|--remove] [-s|--status] [-v|--version]"
+     echo "             [-n|--reconfig] [-q|--stop] [-p|--start]"
+     echo "             [-r|--remove] [-s|--status] [-u|--upgrade]"
+     echo "             [-v|--version]"
      echo ""
      echo "  -c, --clear     clear previous minion identifier and keys,"
      echo "                     and set specified identifier if present"
@@ -290,8 +302,12 @@ esac
      echo "                     silent error warning debug info"
      echo "                     default loglevel is warning"
      echo "  -m, --minionversion install salt-minion version, default[latest]"
+     echo "  -n, --reconfig  salt-minion restarts after reading updated config"
+     echo "  -q, --stop      stop salt-minion"
+     echo "  -p, --start     start salt-minion (restarts salt-minion)"
      echo "  -r, --remove    deactivate and remove the salt-minion"
      echo "  -s, --status    return status for this script"
+     echo "  -u, --upgrade   upgrade when installing, used with --install"
      echo "  -v, --version   version of this script"
      echo ""
      echo "  salt-minion VMTools integration script"
@@ -310,6 +326,7 @@ esac
 # Results:
 #   Exits with hard-coded value 130
 #
+# shellcheck disable=SC2329
 
 _cleanup_int() {
     rm -rf "$WORK_DIR"
@@ -323,6 +340,7 @@ _cleanup_int() {
 #
 #   Cleanups any running process and areas on exit
 #
+# shellcheck disable=SC2329
 _cleanup_exit() {
     rm -rf "$WORK_DIR"
     _debug_log "$0:${FUNCNAME[0]} Deleted temp working directory $WORK_DIR"
@@ -382,6 +400,94 @@ _set_log_level() {
 }
 
 
+
+#
+# _get_desired_salt_version_fn
+#
+#   Get the appropriate desirted salt version based on salt_url_version,
+#       latest or specified input Salt version, 3007, 3006, 3006.x, 3007.1
+#       and set salt_specific_version accordinly
+#
+#   Note: typically Salt version includes the release number in addition to
+#         version number or 'latest' for the most recent release
+#
+#           for example: currently major version 3006 implies 3006.9
+#               the latest version of Salt 3006.x
+#
+#       if an unsupported version is input, for example: 3004.2
+#       it will default to installing the latest version
+#
+# Input:
+#       directory contains directory list of current available
+#           Salt versions, 3006.x - 3007.1
+#
+# Results:
+#   Returns with exit code
+#
+_get_desired_salt_version_fn() {
+
+    if [[ "$#" -ne 1 ]]; then
+        _error_log "$0:${FUNCNAME[0]} error expected one parameter "\
+            "specifying the location for directories containing versions Salt"
+    fi
+
+    _info_log "$0:${FUNCNAME[0]} processing getting desired Salt version "\
+        "'$salt_url_version' for salt-minion to install, input directory $1"
+
+    generic_versions_tmpdir="$1"
+    curr_pwd=$(pwd)
+    cd  ${generic_versions_tmpdir} || return 1
+
+    # something werid is happening with tail, that does not fail in test
+    # programs getting failures inside tail hence use bash loop
+    if [ "$salt_url_version" = "latest" ]; then
+        # shellcheck disable=SC2010,SC2012
+        ## _GENERIC_PKG_VERSION=$(ls ./. | grep -v 'index.html' | sort -V -u | tail -n 1)
+        test_dir=$(ls ./. | grep -v 'index.html' | sort -V -u)
+        for idx in $test_dir
+        do
+            _GENERIC_PKG_VERSION="$idx"
+        done
+        _debug_log "$0:${FUNCNAME[0]} latest found version '${_GENERIC_PKG_VERSION}'"
+
+    elif [ "$(echo "$salt_url_version" | grep -E '^(3006|3007)$')" != "" ]; then
+        # want major latest version of Salt
+        # shellcheck disable=SC2010,SC2012
+        ## _GENERIC_PKG_VERSION=$(ls ./. | grep -v 'index.html' | sort -V -u | grep -E "$salt_url_version" | tail -n 1)
+        test_dir=$(ls ./. | grep -v 'index.html' | sort -V -u | grep -E "$salt_url_version")
+        for idx in $test_dir
+        do
+            _GENERIC_PKG_VERSION="$idx"
+        done
+        _debug_log "$0:${FUNCNAME[0]} input $salt_url_version found "\
+            "version '${_GENERIC_PKG_VERSION}'"
+
+    elif [ "$(echo "$salt_url_version" | grep -E '^([3-9][0-5]{2}[6-9](\.[0-9]*)?)')" != "" ]; then
+        # Minor version Salt, want specific minor version
+        # if old style VMTools version 3004.2-1 is used
+        # defaults to else and install latest
+        _GENERIC_PKG_VERSION="$salt_url_version"
+    else
+        # default to latest version Salt
+        # shellcheck disable=SC2010,SC2012
+        ## _GENERIC_PKG_VERSION=$(ls ./. | grep -v 'index.html' | sort -V -u | tail -n 1)
+        test_dir=$(ls ./. | grep -v 'index.html' | sort -V -u)
+        for idx in $test_dir
+        do
+            _GENERIC_PKG_VERSION="$idx"
+        done
+        _debug_log "$0:${FUNCNAME[0]} default found version '${_GENERIC_PKG_VERSION}'"
+
+    fi
+    cd ${curr_pwd} || return 1
+
+    # set specific version of Salt to use
+    salt_specific_version="${_GENERIC_PKG_VERSION}"
+
+    return 0
+}
+
+
 #
 # _set_install_minion_version_fn
 #
@@ -391,9 +497,11 @@ _set_log_level() {
 #   Note: typically Salt version includes the release number in addition to
 #         version number or 'latest' for the most recent release
 #
-#           for example: 3003.3-1
+#           for example: 3006.8
 #
 # Results:
+#   Sets salt_url_version to latest or specified input
+#       Salt version, 3007, 3006, 3006.x
 #   Returns with exit code
 #
 
@@ -410,6 +518,7 @@ _set_install_minion_version_fn() {
 
     salt_version=$(echo "$1" | cut -d ' ' -f 1)
     if [[ "latest" = "${salt_version}" ]]; then
+        # salt_url_version already set to default_salt_url_version
         _debug_log "$0:${FUNCNAME[0]} input Salt version for salt-minion to "\
             "install is 'latest', leaving as default "\
             "'${default_salt_url_version}' for now"
@@ -426,54 +535,6 @@ _set_install_minion_version_fn() {
     return 0
 }
 
-#
-# _set_post_3005_flags_from_version
-#
-#   Sets the POST_3005_FLAG and POST_3005_MAJOR_VER_FLAG
-#       from the version currently present in salt_url_version
-#
-#   Will also set base_url if not already defined by --source option
-#
-# Results:
-#   Returns with exit code
-#
-_set_post_3005_flags_from_version() {
-    _info_log "$0:${FUNCNAME[0]} setting POST_3005_FLAG and "\
-        "POST_3005_MAJOR_VER_FLAG from Salt version '${salt_url_version}'"
-
-    if [[ "latest" = "${salt_url_version}" ]]; then
-        POST_3005_FLAG=1
-        POST_3005_MAJOR_VER_FLAG=1
-        base_url="${post_3005_base_url}"
-        # done, already have url for latest & major versions
-        _debug_log "$0:${FUNCNAME[0]} post-3005 install, using latest "\
-            "base_url '${base_url}'"
-    else
-        ver_chk=$(echo "${salt_url_version}" | cut -d '.' -f 1)
-        if [[ ${ver_chk} -ge 3006 ]]; then
-            POST_3005_FLAG=1
-            ver_chk_major=$(echo "${salt_url_version}" | cut -d '.' -f 1)
-            ver_chk_minor=$(echo "${salt_url_version}" | cut -d '.' -f 2)
-            _debug_log "$0:${FUNCNAME[0]} post-3005 install, checking "\
-                "for major version only '${ver_chk_major}', minor "\
-                "'${ver_chk_minor}'"
-            if [[ "${ver_chk_major}" = "${ver_chk_minor}" ]]; then
-                POST_3005_MAJOR_VER_FLAG=1
-                base_url="${post_3005_base_url}"
-            else
-                base_url="${post_3005_base_url}/minor"
-            fi
-            _debug_log "$0:${FUNCNAME[0]} post-3005 install, for "\
-                "'${salt_url_version}' using base_url '${base_url}'"
-        else
-            # install pre-3006, use older url
-            base_url="${pre_3006_base_url}"
-            _debug_log "$0:${FUNCNAME[0]} pre-3006 install, for "\
-                "'${salt_url_version}' using base_url '${base_url}'"
-        fi
-    fi
-}
-
 
 #
 # _update_minion_conf_ary
@@ -629,9 +690,9 @@ _fetch_vmtools_salt_minion_conf_guestvars() {
         cfg_key=$(echo "${idx}" | cut -d '=' -f 1)
         cfg_value=$(echo "${idx}" | cut -d '=' -f 2)
         _update_minion_conf_ary "${cfg_key}" "${cfg_value}" || {
-            _error_log "$0:${FUNCNAME[0]} error updating minion configuration "\
-                "array with key '${cfg_key}' and value '${cfg_value}', "\
-                "retcode '$?'";
+            _error_log "$0:${FUNCNAME[0]} error updating minion "\
+                "configuration array with key '${cfg_key}' and value "\
+                "'${cfg_value}', retcode '$?'";
         }
     done
 
@@ -766,7 +827,7 @@ _fetch_vmtools_salt_minion_conf() {
                     "configuration parameters for master public signed key"
                 echo "${m_cfg_keys[${chk_idx}]}: True" \
                     >> "${salt_minion_conf_file}"
-                mkdir -p "/etc/salt/pki/minion"
+                mkdir -p "${salt_conf_dir}/pki/minion"
                 cp -f "${m_cfg_values[${chk_idx}]}" \
                     "${salt_master_sign_dir}/"
             else
@@ -782,196 +843,14 @@ _fetch_vmtools_salt_minion_conf() {
 }
 
 
-#
-# _curl_download
-#
-#   Retrieve file from specified url to specific file
-#
-# Results:
-#   Exits with 0 or error code
-#
-
-_curl_download() {
-    local file_name="$1"
-    local file_url="$2"
-    local download_retry_failed=1       # assume issues
-    local _retn=0
-
-    _info_log "$0:${FUNCNAME[0]} attempting download of file '${file_name}'"
-
-    for ((i=0; i<CURL_DOWNLOAD_RETRY_COUNT; i++))
-    do
-        # ensure minimum version of TLS used is v1.2
-        curl -o "${file_name}" --tlsv1.2 -fsSL "${file_url}"
-        _retn=$?
-        if [[ ${_retn} -ne 0 ]]; then
-            _warning_log "$0:${FUNCNAME[0]} failed to download file "\
-                "'${file_name}' from '${file_url}' on '${i}' attempt, "\
-                "retcode '${_retn}'"
-        else
-            download_retry_failed=0
-            _debug_log "$0:${FUNCNAME[0]} successfully downloaded file "\
-                "'${file_name}' from '${file_url}' after '${i}' attempts"
-            break
-        fi
-    done
-    if [[ ${download_retry_failed} -ne 0 ]]; then
-        _error_log "$0:${FUNCNAME[0]} failed to download file '${file_name}' "\
-            "from '${file_url}' after '${CURL_DOWNLOAD_RETRY_COUNT}' attempts"
-    fi
-
-    _info_log "$0:${FUNCNAME[0]} successfully downloaded file "\
-        "'${file_name}' from '${file_url}'"
-    return 0
-}
-
-
-#
-# _parse_json_specd_ver
-#
-#   Retrieve the salt-minion from Salt repository
-#
-# Results:
-#   Echos string containing colon separated version, name and sha512
-#   from parsed input repo json file
-#   Echos empty '' if 'salt_url_version' is not found in repo json file
-#
-#   Note: salt_url_version defaults to 'latest' unless set to a specific
-#       Salt minion version, for example: 3004.1-1
-#
-
- _parse_json_specd_ver() {
-    local file_name="$1"
-    local file_value=""
-    local blk_count=0
-    local specd_ver_blk_count=0
-    local specd_ver_flag=0
-    local found_specd_ver_linux=0
-
-    local var1=""
-    local var2=""
-    local machine_arch_chk="${MACHINE_ARCH}"
-    declare -A rdict
-
-    _info_log "$0:${FUNCNAME[0]} parsing of repo json file '${file_name}'"
-
-    if [[ ${POST_3005_FLAG} -eq 0 ]]; then
-        machine_arch_chk="amd64"    # pre_3006 used amd64
-    fi
-
-    file_value=$(<"${file_name}")
-
-    # limit 80 cols
-    var1=$(echo "${file_value}" | sed 's/,/,\n/g' | sed 's/{/\n{\n/g')
-    var2=$(echo "${var1}" | sed 's/}/\n}\n/g' | sed 's/,//g' | sed 's/"//g')
-
-    while IFS= read -r line
-    do
-        _debug_log "$0:${FUNCNAME[0]} parsing line '${line}'"
-        if [[ -z "${line}" ]]; then
-            continue
-        fi
-        if [[ "${line}" = "{" ]]; then
-            (( blk_count++ ))
-        elif [[ "${line}" = "}" ]]; then
-            # examine directory just read in
-            if [[  ${specd_ver_flag} -eq 1 ]]; then
-                if [[ "${rdict['os']}" = "linux" \
-                    && "${rdict['arch']}" = "${machine_arch_chk}" ]]; then
-                    # have linux values for specd_ver
-                    _debug_log "$0:${FUNCNAME[0]} parsed following linux for "\
-                    "specified version '${salt_url_version}' from repo json "\
-                    "file '${file_name}', os ${rdict['os']}, version "\
-                    "${rdict['version']}, name ${rdict['name']}, sha512 "\
-                    "${rdict['SHA512']}"
-                    found_specd_ver_linux=1
-                    break
-                fi
-            fi
-
-            if [[ ${blk_count} -eq ${specd_ver_blk_count} ]]; then
-                specd_ver_flag=0
-                ## break
-            fi
-            (( blk_count-- ))
-        else
-            if [[ ${POST_3005_FLAG} -eq 1 \
-                && ${POST_3005_MAJOR_VER_FLAG} -eq 1 ]]; then
-                # doing major version check
-                line_major_key=$(echo "${line}" | cut -d ':' -f 1 | cut -d '-' -f 2 | cut -d '.' -f 1 |xargs)
-                line_key=$(echo "${line}" | cut -d ':' -f 1 | xargs)
-                line_value=$(echo "${line}" | cut -d ':' -f 2 | xargs)
-                _debug_log "$0:${FUNCNAME[0]} check line_major_key "\
-                    "'${line_major_key}' again salt_url_version "\
-                    "'${salt_url_version}', line_key '${line_key}', "\
-                    "line_value '${line_value}'"
-                if [[ "${line_major_key}" = "${salt_url_version}" ]]; then
-                    # blk_count encountered 'specd_ver', closing brace check
-                    specd_ver_flag=1
-                    specd_ver_blk_count=${blk_count}
-                    (( specd_ver_blk_count++ ))
-                    _debug_log "$0:${FUNCNAME[0]} found specd version, "\
-                        "version '${salt_url_version}' and line_major_key "\
-                        "'${line_major_key}', line_key '${line_key}' "\
-                        "specd_ver_blk_count '${specd_ver_blk_count}'"
-                else
-                    rdict["${line_key}"]="${line_value}"
-                    _debug_log "$0:${FUNCNAME[0]} updated dictionary for "\
-                        "major version with line_key '${line_key}' and "\
-                        "line_value '${line_value}'"
-                fi
-            else
-                line_key=$(echo "${line}" | cut -d ':' -f 1 | xargs)
-                line_value=$(echo "${line}" | cut -d ':' -f 2 | xargs)
-                _debug_log "$0:${FUNCNAME[0]} check line_key '${line_key}' "\
-                    "again salt_url_version '${salt_url_version}', "\
-                    "line_value '${line_value}'"
-                if [[ "${line_key}" = "${salt_url_version}" ]]; then
-                    # blk_count encountered 'specd_ver', closing brace check
-                    specd_ver_flag=1
-                    specd_ver_blk_count=${blk_count}
-                    (( specd_ver_blk_count++ ))
-                    _debug_log "$0:${FUNCNAME[0]} found specd version, "\
-                        "version '${salt_url_version}' and line_key "\
-                        "'${line_key}' and specd_ver_blk_count "\
-                        "'${specd_ver_blk_count}'"
-                else
-                    rdict["${line_key}"]="${line_value}"
-                    _debug_log "$0:${FUNCNAME[0]} updated dictionary with "\
-                    "line_key '${line_key}' and line_value '${line_value}'"
-                fi
-            fi
-        fi
-    done <<< "${var2}"
-
-    if [[ ${found_specd_ver_linux} -eq 1 ]]; then
-        echo "${rdict['version']}:${rdict['name']}:${rdict['SHA512']}"
-    else
-        _error_log "$0:${FUNCNAME[0]} unable to parse version, name and "\
-        "sha512 from repo json file '${file_name}'"
-        # echo ""
-    fi
-    return 0
-}
-
-
 #
 # _fetch_salt_minion
 #
 #   Retrieve the salt-minion from Salt repository
 #
-# Note:
-#   pre_3006    The repo.json file only existed in one place (salt/onedir)
-#               and contained everything in the directory and sub-directories
-#               where the repo.json file resides.
-#   post_3005   There are two repo.json files:
-#                   top level (salt/py3/onedir):
-#                       repo.json contains 'latest' and 'major versions' only.
-#                   minor level (salt/py3/onedir/minor):
-#                       repo.json contains 'latest' and 'minor versions' only.
-#
-# With the 3006 release a breaking change in directory structure was introduced
-# to bring conformity with directory structure used for packages.
+# Note: Only support Salt 3006 and higher with new Broadcom infrastructure
+#       salt_url_version is always set with desired version of Salt
+#       for example: latest, 3006, 3007, 3006.8, 3007.1
 #
 # Side Effects:
 #   CURRENT_STATUS updated
@@ -981,53 +860,42 @@ _curl_download() {
 #
 
 _fetch_salt_minion() {
+
     # fetch the current salt-minion into specified location
     # could check if already there but by always getting it
     # ensure we are not using stale versions
     local _retn=0
-    local calc_sha512sum=1
-    local download_retry_failed=1       # assume issues
 
     local salt_pkg_name=""
     local salt_url=""
-    local json_version_name_sha=""
 
     local local_base_url=""
     local local_file_flag=0
-    local local_count_repo_json=0
-
-    local salt_tarball=""
-    local salt_tarball_SHA512=""
 
-    local salt_json_version=""
-    local salt_json_name=""
-    local salt_json_sha512=""
-    local salt_pkg512=""
+    local salt_pkg_sha256_found=0
+    local salt_pkg_shakey=0
+    local salt_pkg_sha256=""
+    local calc_sha256sum=1
 
     local install_onedir_chk=0
     local sys_arch=""
 
-    local ver_chk=""
-    local ver_chk_major=""
-    local ver_chk_minor=""
+    local salt_pkg_metadata=0
 
-    _debug_log "$0:${FUNCNAME[0]} retrieve the salt-minion and check "\
-        "its validity"
+    _debug_log "$0:${FUNCNAME[0]} retrieve the salt-minion and check its validity"
 
     CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
     mkdir -p ${base_salt_location}
-    ## cd ${base_salt_location} || return $?
     cd "${WORK_DIR}" || return $?
 
-    # check for pre-3006 or post-3005 and adjust base_url
     # unless already defined by --source option
     if [[ -z "${base_url}" ]]; then
         _debug_log "$0:${FUNCNAME[0]} no source option used, determine "\
             "version attempting to install, version '${salt_url_version}"
-        _set_post_3005_flags_from_version
+        base_url="${bd_3006_base_url}"
     else
         _debug_log "$0:${FUNCNAME[0]} source url provided, need to scan for "\
-            "pre 3006 / post 3005, and local file using base_url '${base_url}'"
+        "local file using base_url '${base_url}'"
 
         # curl on Linux doesn't support file:// support
         if echo "${base_url}" | grep -q '^/' ; then
@@ -1042,261 +910,133 @@ _fetch_salt_minion() {
             "from '${base_url}'"
         else
             _debug_log "$0:${FUNCNAME[0]} using non-local source '${base_url}'"
-
-            ver_chk=$(echo "${base_url}" | grep  'salt/py3/onedir')
-            if [[ -n "${ver_chk}" ]]; then
-                POST_3005_FLAG=1
-                _set_post_3005_flags_from_version
-            fi
         fi
     fi
 
+    sys_arch="${MACHINE_ARCH}"
+
     if [[ ${local_file_flag} -eq 1 ]]; then
         # local absolute path
         # and allow for Linux handling multiple slashes
 
-        # need to determine if pre 3005 or post 3006
-        local_count_repo_json=$(find "${local_base_url}" -name repo.json|wc -l)
-        if [[ ${local_count_repo_json} -eq 2 ]]; then
-            POST_3005_FLAG=1
-            _set_post_3005_flags_from_version
-        else
-            _debug_log "$0:${FUNCNAME[0]} pre-3006 local install, for "\
-                "'${salt_url_version}' using specified source "\
-                "'${local_base_url}'"
-        fi
-
-        if [[ ${POST_3005_FLAG} -eq 1 ]]; then
-            if [[ ${POST_3005_MAJOR_VER_FLAG} -eq 1 ]]; then
-                salt_url="${local_base_url}"
-            else
-                salt_url="${local_base_url}/minor"
-            fi
-        else
-            salt_url="${local_base_url}/${salt_url_version}"
-        fi
-
-        if [[ -f "${salt_url}/${repo_json_file}"  ]]; then
-            _debug_log "$0:${FUNCNAME[0]} successfully found file "\
-            "'${repo_json_file}' in '${salt_url}/${repo_json_file}'"
-
-            cp -a "${salt_url}/${repo_json_file}" .
-            _retn=$?
-            if [[ ${_retn} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} failed to find file "\
-                "'${repo_json_file}' in specified location ${base_url}, "\
-                "error '${_retn}'"
-            fi
+        # use defaults
+        # directory with onedir files and retrieve files from it
+        salt_url="${local_base_url}"
+        curr_dir=$(pwd)
+        _debug_log "$0:${FUNCNAME[0]} current directory ${curr_dir}"
+
+        # get desired specific version of Salt
+        _get_desired_salt_version_fn "${salt_url}"
+        cd "${salt_url}" || return 1
+        cd "${salt_specific_version}" || return 1
+        salt_pkg_name=$(ls "${salt_name}-${salt_specific_version}-onedir-linux-${sys_arch}.tar.xz")
+        cd "${curr_dir}" || return 1
+        cp -a "${salt_url}/${salt_specific_version}/${salt_pkg_name}" ${salt_pkg_name}
+        _debug_log "$0:${FUNCNAME[0]} successfully copied tarball from "\
+            "'${salt_url}/${salt_specific_version}' to file '${salt_pkg_name}'"
+    else
+        # assume use curl for local or remote URI
+        # directory with onedir files and retrieve files from it
 
-            # use latest from repo.json file, (version:name:sha512)
-            json_version_name_sha=$(_parse_json_specd_ver "${repo_json_file}")
-            salt_json_version=$(\
-                echo "${json_version_name_sha}" | awk -F":" '{print $1}')
-            salt_json_name=$(\
-                echo "${json_version_name_sha}" | awk -F":" '{print $2}')
-            salt_json_sha512=$(\
-                echo "${json_version_name_sha}" | awk -F":" '{print $3}')
-            _debug_log "$0:${FUNCNAME[0]} using repo.json values version "\
-                "'${salt_json_version}', name '${salt_json_name}, sha512 "\
-                "'${salt_json_sha512}'"
-
-            salt_pkg_name="${salt_json_name}"
-            if [[ ${POST_3005_FLAG} -eq 1 \
-                && ${POST_3005_MAJOR_VER_FLAG} -eq 1 ]]; then
-                cp -a "${salt_url}/minor/${salt_json_version}/${salt_pkg_name}" .
-            else
-                cp -a "${salt_url}/${salt_json_version}/${salt_pkg_name}" .
-            fi
-            _retn=$?
-            if [[ ${_retn} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} failed to find file "\
-                "'${salt_pkg_name}' in specified location "\
-                "${salt_url}/${salt_json_version}, error '${_retn}'"
-            fi
-            _debug_log "$0:${FUNCNAME[0]} successfully copied from "\
-                "'${salt_url}/${salt_json_version}' to file '${salt_pkg_name}'"
+        _debug_log "$0:${FUNCNAME[0]} using curl to download from url '${base_url}'"
 
-            salt_pkg512=$(sha512sum "${salt_pkg_name}" |awk -F" " '{print $1}')
-            if [[ "${salt_pkg512}" != "${salt_json_sha512}" ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} copied file "\
-                "'${salt_url}/${salt_json_version}' failed to match "\
-                "checksum in file '${repo_json_file}'"
-            fi
-        else
-            # use defaults
-            # repo.json file is missing, look for 'latest'
-            # directory with onedir files and retrieve files from it
-            salt_url="${local_base_url}/${salt_url_version}"
+        # get dir listing from url, sort and pick highest
+        generic_versions_tmpdir=$(mktemp -d)
+        curr_pwd=$(pwd)
+        cd  ${generic_versions_tmpdir} || return 1
+        # leverage the onedir directories since release Windows and Linux
+        wget -r -np -nH --exclude-directories=windows,relenv,macos -x -l 1 "${base_url}/"
+        cd ${curr_pwd} || return 1
 
-            _debug_log "$0:${FUNCNAME[0]} current directory $(pwd)"
+        # get desired specific version of Salt
+        _get_desired_salt_version_fn "${generic_versions_tmpdir}/artifactory/saltproject-generic/onedir"
 
-            cp -a "${salt_url}/${salt_name}"*-linux-*.tar.?z .
-            _retn=$?
-            if [[ ${_retn} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} failed to find file "\
-                "for Linux in specified location ${salt_url}, "\
-                "error '${_retn}'"
-            fi
+        # clean up temp dir
+        rm -fR ${generic_versions_tmpdir}
 
-            cp -a "${salt_url}/${salt_name}"*-linux-*.tar.?z.sha512 . 2>/dev/null
-            cp -a "${salt_url}/${salt_name}"*_SHA512 .
-            _retn=$?
-            if [[ ${_retn} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} failed to find file "\
-                "sha512 in specified location ${salt_url}, "\
-                "error '${_retn}'"
-            fi
+        salt_pkg_name="${salt_name}-${salt_specific_version}-onedir-linux-${sys_arch}.tar.xz"
+        salt_url="${base_url}/${salt_specific_version}/${salt_pkg_name}"
 
-            ## shellcheck
-            salt_chksum_file=$(ls "${salt_name}"*_SHA512)
-            salt_pkg_name=$(ls "${salt_name}"*-linux-amd64.tar.gz 2>/dev/null)
-            if  [[ -z "${salt_pkg_name}" ]]; then
-                # failed to find pre-3006 linux tarball,
-                # attempt to find post-3005 with appro. arch
-                sys_arch="${MACHINE_ARCH}"
-                salt_chksum_file=$(ls "${salt_name}"*-linux-"${sys_arch}".tar.xz.sha512)
-                salt_pkg_name=$(ls "${salt_name}"*-linux-"${sys_arch}".tar.xz)
-            fi
-            _debug_log "$0:${FUNCNAME[0]} successfully copied tarball from "\
-                "'${salt_url}' file '${salt_pkg_name}'"
-            _debug_log "$0:${FUNCNAME[0]} successfully coped checksum from "\
-                "'${salt_url}' file '${salt_chksum_file}'"
-            calc_sha512sum=$(grep "${salt_pkg_name}" \
-                "${salt_chksum_file}" | sha512sum --check --status)
-            if [[ ${calc_sha512sum} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} downloaded file "\
-                "'${salt_pkg_name}' failed to match checksum in file "\
-                "'${salt_chksum_file}'"
-            fi
+        # assume http://, https:// or similar
+        wget -q -r -l1 -nd -np -A "${salt_pkg_name}" "${salt_url}"
+        _retn=$?
+        if [[ ${_retn} -ne 0 ]]; then
+            CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
+            _error_log "$0:${FUNCNAME[0]} downloaded file "\
+            "'${salt_pkg_name}' failed to download, error '${_retn}'"
         fi
-    else
-        # assume use curl for local or remote URI
-        _curl_download "${repo_json_file}" "${base_url}/${repo_json_file}"
-        _debug_log "$0:${FUNCNAME[0]} successfully downloaded from "\
-            "'${base_url}/${repo_json_file}' into file '${repo_json_file}'"
-
-        if [[ -f "${repo_json_file}" ]]; then
-            # use latest from repo.json file, (version:name:sha512)
-            json_version_name_sha=$(_parse_json_specd_ver "${repo_json_file}")
-            salt_json_version=$(\
-                echo "${json_version_name_sha}" | awk -F":" '{print $1}')
-            salt_json_name=$(\
-                echo "${json_version_name_sha}" | awk -F":" '{print $2}')
-            salt_json_sha512=$(\
-                echo "${json_version_name_sha}" | awk -F":" '{print $3}')
-            _debug_log "$0:${FUNCNAME[0]} using repo.json values version "\
-                "'${salt_json_version}', name '${salt_json_name}, sha512 "\
-                "'${salt_json_sha512}'"/
-
-            salt_pkg_name="${salt_json_name}"
-            if [[ ${POST_3005_FLAG} -eq 1 \
-                && ${POST_3005_MAJOR_VER_FLAG} -eq 1 ]]; then
-                salt_url="${base_url}/minor/${salt_json_version}/${salt_pkg_name}"
-            else
-                salt_url="${base_url}/${salt_json_version}/${salt_pkg_name}"
-            fi
-            _curl_download "${salt_pkg_name}" "${salt_url}"
-            _debug_log "$0:${FUNCNAME[0]} successfully downloaded from "\
-                "'${salt_url}' into file '${salt_pkg_name}'"
 
-            salt_pkg512=$(sha512sum "${salt_pkg_name}" |awk -F" " '{print $1}')
-            if [[ "${salt_pkg512}" != "${salt_json_sha512}" ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} downloaded file '${salt_url}' "\
-                    "failed to match checksum in file '${repo_json_file}'"
-            fi
-        else
-            # use defaults
-            # repo.json file is missing, look for 'latest'
-            # directory with onedir files and retrieve files from it
-            salt_url="${base_url}/${salt_url_version}"
-            salt_tarball="${salt_name}*-linux-*.tar.?z"
-            salt_tarball_SHA512="${salt_name}*_SHA512"
-
-            # assume http://, https:// or similar
-            wget -q -r -l1 -nd -np -A "${salt_tarball}" "${salt_url}"
-            _retn=$?
-            if [[ ${_retn} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} downloaded file "\
-                "'${salt_tarball}' failed to download, error '${_retn}'"
-            fi
-            wget -q -r -l1 -nd -np -A "${salt_name}*_SHA512" "${salt_url}"
-            _retn=$?
-            if [[ ${_retn} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} downloaded file "\
-                "'${salt_tarball_SHA512}' failed to download, error '${_retn}'"
+        salt_pkg_metadata=$(curl "${bd_3006_chksum_base_url}/${salt_specific_version}/${salt_pkg_name}")
+        salt_pkg_sha=$(echo "${salt_pkg_metadata}" | grep -w "sha256" | sort | uniq)
+        if [[ -n "${salt_pkg_sha}" ]]; then
+            # have package metadata to process
+            salt_pkg_shakey=$(echo "${salt_pkg_sha}" | awk -F ':' '{print $1}' | awk -F '"' '{print $2}')
+            salt_pkg_sha256=$(echo "${salt_pkg_sha}" | awk -F ':' '{print $2}' | awk -F '"' '{print $2}')
+
+            _debug_log "$0:${FUNCNAME[0]} found information for file "\
+                "'${salt_pkg_name}', shakey '${salt_pkg_shakey}', "\
+                "sha256value '${salt_pkg_sha256}'"
+
+            if [[ "${salt_pkg_shakey}" = "sha256" ]]; then
+                # Found sha256
+                salt_pkg_sha256_found=1
+                _debug_log "$0:${FUNCNAME[0]} successfully found sha256 "\
+                    "information on file '${salt_pkg_name}'"
+            else
+                # sanity check for sha256 key not found
+                CURRENT_STATUS=${STATUS_CODES_ARY[installing]}
+                _warning_log "$0:${FUNCNAME[0]} failed to find sha256 "\
+                    "information for downloaded file '${salt_pkg_name}', "\
+                    "error '${salt_pkg_sha256}'"
             fi
+        fi
 
-            ## shellcheck
-            salt_chksum_file=$(ls "${salt_name}"*_SHA512)
-            salt_pkg_name=$(ls "${salt_name}"*-linux-amd64.tar.gz)
-            if  [[ -z "${salt_pkg_name}" ]]; then
-                # failed to find pre-3006 linux tarball,
-                # attempt to find post-3005 with appro. arch
-                sys_arch="${MACHINE_ARCH}"
-                salt_chksum_file=$(ls "${salt_name}"*-linux-"${sys_arch}".tar.xz.sha512)
-                salt_pkg_name=$(ls "${salt_name}"*-linux-"${sys_arch}".tar.xz)
-            fi
-            _debug_log "$0:${FUNCNAME[0]} successfully downloaded tarball "\
-                "from '${salt_url}' into file '${salt_pkg_name}'"
-            _debug_log "$0:${FUNCNAME[0]} successfully downloaded checksum "\
-                "from '${salt_url}' into file '${salt_chksum_file}'"
-
-            calc_sha512sum=$(grep "${salt_pkg_name}" \
-                "${salt_chksum_file}" | sha512sum --check --status)
-            if [[ ${calc_sha512sum} -ne 0 ]]; then
+        if [[ ${salt_pkg_sha256_found} -eq 1 ]]; then
+            # Have sha256 information to check against
+            calc_sha256sum=$(sha256sum "${salt_pkg_name}" | awk -F ' ' '{print $1}')
+            if [[ "${calc_sha256sum}" != "${salt_pkg_sha256}" ]]; then
                 CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _error_log "$0:${FUNCNAME[0]} downloaded file "\
-                    "'${salt_pkg_name}' failed to match checksum in file "\
-                    "'${salt_chksum_file}'"
+                _error_log "$0:${FUNCNAME[0]} generated checksum "\
+                "'${calc_sha256sum}' for downloaded file '${salt_pkg_name}' "\
+                "does not match that retrieved from repository '${salt_pkg_sha256}'"
+            else
+                _debug_log "$0:${FUNCNAME[0]} downloaded file "\
+                    "'${salt_pkg_name}' matched checksum retrieved from repository"
             fi
         fi
     fi
 
-    _debug_log "$0:${FUNCNAME[0]} sha512sum match was successful"
-    if [[ ${POST_3005_FLAG} -eq 1 ]]; then
-        # need to setup salt user and group if not already existing
-        _debug_log "$0:${FUNCNAME[0]} setup salt user and group if not "\
-            "already existing"
-        _SALT_GROUP=salt
-        _SALT_USER=salt
-        _SALT_NAME=Salt
+    # need to setup salt user and group if not already existing
+    _debug_log "$0:${FUNCNAME[0]} setup salt user and group if not "\
+        "already existing"
+    _SALT_GROUP=salt
+    _SALT_USER=salt
+    _SALT_NAME=Salt
+    # 1. create group if not existing
+    if getent group "${_SALT_GROUP}" 1>/dev/null; then
+        _debug_log "$0:${FUNCNAME[0]} already group salt, assume user "\
+            "and group setup for Salt"
+    else
+        _debug_log "$0:${FUNCNAME[0]} setup group and user salt"
+        # create user to avoid running server as root
         # 1. create group if not existing
-        if getent group "${_SALT_GROUP}" 1>/dev/null; then
-            _debug_log "$0:${FUNCNAME[0]} already group salt, assume user "\
-                "and group setup for Salt"
-        else
-            _debug_log "$0:${FUNCNAME[0]} setup group and user salt"
-            # create user to avoid running server as root
-            # 1. create group if not existing
-            groupadd --system "${_SALT_GROUP}" 2>/dev/null
-            # 2. create homedir if not existing
-            if [[ ! -d "${salt_dir}" ]]; then
-                mkdir -p "${salt_dir}"
-            fi
-            # 3. create user if not existing
-            if ! getent passwd | grep -q "^${_SALT_USER}:"; then
-              useradd --system --no-create-home -s /sbin/nologin -g \
-                "${_SALT_GROUP}" "${_SALT_USER}" 2>/dev/null
-            fi
-            # 4. adjust passwd entry
-            usermod -c "${_SALT_NAME}" -d "${salt_dir}" -g "${_SALT_GROUP}" \
-                "${_SALT_USER}" 2>/dev/null
+        groupadd --system "${_SALT_GROUP}" 2>/dev/null
+        # 2. create homedir if not existing
+        if [[ ! -d "${salt_dir}" ]]; then
+            mkdir -p "${salt_dir}"
         fi
-        tar xf "${salt_pkg_name}" -C "${base_salt_location}" 1>/dev/null
-        # 5. adjust file and directory permissions
-        chown -R "${_SALT_USER}":"${_SALT_GROUP}" "${salt_dir}"
-    else
-        tar xf "${salt_pkg_name}" -C "${base_salt_location}" 1>/dev/null
+        # 3. create user if not existing
+        if ! getent passwd | grep -q "^${_SALT_USER}:"; then
+          useradd --system --no-create-home -s /sbin/nologin -g \
+            "${_SALT_GROUP}" "${_SALT_USER}" 2>/dev/null
+        fi
+        # 4. adjust passwd entry
+        usermod -c "${_SALT_NAME}" -d "${salt_dir}" -g "${_SALT_GROUP}" \
+            "${_SALT_USER}" 2>/dev/null
     fi
+    tar xf "${salt_pkg_name}" -C "${base_salt_location}" 1>/dev/null
+    # 5. adjust file and directory permissions
+    chown -R "${_SALT_USER}":"${_SALT_GROUP}" "${salt_dir}"
     _retn=$?
     if [[ ${_retn} -ne 0 ]]; then
         CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
@@ -1359,8 +1099,8 @@ _check_multiple_script_running() {
 #   for example: install salt-minion from rpm or deb package
 #
 # Results:
-#   0 - No standard install found and empty string output
-#   !0 - Standard install found and Salt version found output
+#   0 - No standard classic install found and empty string output
+#   !0 - Standard  classic install found and Salt version found output
 #
 
 _check_classic_minion_install() {
@@ -1376,7 +1116,8 @@ _check_classic_minion_install() {
 /usr/bin/salt-call
 /usr/local/bin/salt-call
 "
-    _info_log "$0:${FUNCNAME[0]} check if standard salt-minion installed"
+    _info_log "$0:${FUNCNAME[0]} check if standard classic "\
+        "salt-minion installed"
 
     for idx in ${list_of_files_check}
     do
@@ -1394,8 +1135,8 @@ _check_classic_minion_install() {
                 # get salt-version
                 local s_ver=""
                 s_ver=$("${idx}" --local test.version |grep -v 'local:' |xargs)
-                _debug_log "$0:${FUNCNAME[0]} found standard salt-minion, "\
-                    "Salt version: '${s_ver}'"
+                _debug_log "$0:${FUNCNAME[0]} found standard classic "\
+                    "salt-minion, Salt version: '${s_ver}'"
                 echo "${s_ver}"
                 _retn=1
                 break
@@ -1580,13 +1321,14 @@ _create_pre_3006_helper_scripts() {
 #
 #   discover and return the current status
 #
-#       0 => installed
+#       0 => installed (and running)
 #       1 => installing
 #       2 => notInstalled
 #       3 => installFailed
 #       4 => removing
 #       5 => removeFailed
 #       6 => externalInstall
+#       7 => installedStopped
 #       126 => scriptFailed
 #
 # Side Effects:
@@ -1609,12 +1351,12 @@ _status_fn() {
     found_salt_ver=$(_check_classic_minion_install)
     if [[ -n "${found_salt_ver}" ]]; then
         _debug_log "$0:${FUNCNAME[0]}" \
-            "existing Standard Salt Installation detected, "\
+            "existing Standard Classic Salt Installation detected, "\
             "Salt version: '${found_salt_ver}'"
             CURRENT_STATUS=${STATUS_CODES_ARY[externalInstall]}
             _retn_status=${STATUS_CODES_ARY[externalInstall]}
     else
-        _debug_log "$0:${FUNCNAME[0]} no standardized install found"
+        _debug_log "$0:${FUNCNAME[0]} no standardized classic install found"
 
         install_onedir_chk=$(_check_onedir_minion_install)
         if [[ ${install_onedir_chk} -eq 2 ]]; then
@@ -1623,11 +1365,11 @@ _status_fn() {
 
         svpid=$(_find_salt_pid)
         if [[ ${install_onedir_chk} -eq 0 && -z ${svpid} ]]; then
-            # check not installed and no process id
+            # not installed and no process id
             CURRENT_STATUS=${STATUS_CODES_ARY[notInstalled]}
             _retn_status=${STATUS_CODES_ARY[notInstalled]}
         elif [[ ${install_onedir_chk} -ne 0 ]]; then
-            # check installed
+            # installed, check for pid
             CURRENT_STATUS=${STATUS_CODES_ARY[installed]}
             _retn_status=${STATUS_CODES_ARY[installed]}
             # normal case but double-check
@@ -1635,23 +1377,197 @@ _status_fn() {
             if [[ -z ${svpid} ]]; then
                 # Note: someone could have stopped the salt-minion,
                 # so installed but not running,
-                # status codes don't allow for that case
-                CURRENT_STATUS=${STATUS_CODES_ARY[installFailed]}
-                _retn_status=${STATUS_CODES_ARY[installFailed]}
+                CURRENT_STATUS=${STATUS_CODES_ARY[installedStopped]}
+                _retn_status=${STATUS_CODES_ARY[installedStopped]}
+            else
+                # have running pid for salt-minion
+                CURRENT_STATUS=${STATUS_CODES_ARY[installed]}
+                _retn_status=${STATUS_CODES_ARY[installed]}
             fi
         elif [[ -z ${svpid} ]]; then
-            # check no process id and main directory still left, =>removeFailed
+            # check no process id and
+            # main directory still left, =>installedStopped
             if [[ ${install_onedir_chk} -ne 0 ]]; then
-                CURRENT_STATUS=${STATUS_CODES_ARY[removeFailed]}
-                _retn_status=${STATUS_CODES_ARY[removeFailed]}
+                CURRENT_STATUS=${STATUS_CODES_ARY[installedStopped]}
+                _retn_status=${STATUS_CODES_ARY[installedStopped]}
+            fi
+        fi
+    fi
+
+    return ${_retn_status}
+}
+
+
+#
+# _stop_fn
+#
+#   stop the salt-minion if running and return the current status
+#
+#       0 => installed (and running)
+#       1 => installing
+#       2 => notInstalled
+#       3 => installFailed
+#       4 => removing
+#       5 => removeFailed
+#       6 => externalInstall
+#       7 => installedStopped
+#       126 => scriptFailed
+#
+# Side Effects:
+#   CURRENT_STATUS updated
+#
+# Results:
+#   Exits numerical status
+#
+
+_stop_fn() {
+    # return status
+    local _retn_status=${STATUS_CODES_ARY[notInstalled]}
+    local install_onedir_chk=0
+    local found_salt_ver=""
+    local systemctl_issue=0
+
+    _info_log "$0:${FUNCNAME[0]} checking status for script"
+
+    _check_multiple_script_running
+
+    found_salt_ver=$(_check_classic_minion_install)
+    if [[ -n "${found_salt_ver}" ]]; then
+        _debug_log "$0:${FUNCNAME[0]}" \
+            "existing Standard Classic Salt Installation detected, "\
+            "Salt version: '${found_salt_ver}'"
+            CURRENT_STATUS=${STATUS_CODES_ARY[externalInstall]}
+            _retn_status=${STATUS_CODES_ARY[externalInstall]}
+    else
+        _debug_log "$0:${FUNCNAME[0]} no standardized classic install found"
+
+        install_onedir_chk=$(_check_onedir_minion_install)
+        if [[ ${install_onedir_chk} -eq 2 ]]; then
+            POST_3005_FLAG=1    # ensure note 3006 and above
+        fi
+
+        if [[ ${install_onedir_chk} -eq 0 ]]; then
+            # not installed
+            CURRENT_STATUS=${STATUS_CODES_ARY[notInstalled]}
+            _retn_status=${STATUS_CODES_ARY[notInstalled]}
+        elif [[ ${install_onedir_chk} -ne 0 ]]; then
+            # installed, check for pid
+            CURRENT_STATUS=${STATUS_CODES_ARY[installed]}
+            _retn_status=${STATUS_CODES_ARY[installed]}
+            svpid=$(_find_salt_pid)
+            if [[ -z ${svpid} ]]; then
+                # Note: someone could have stopped the salt-minion,
+                # so installed but not running,
+                CURRENT_STATUS=${STATUS_CODES_ARY[installedStopped]}
+                _retn_status=${STATUS_CODES_ARY[installedStopped]}
+            else
+                # have pid for salt-minion, need to stop
+                systemctl stop salt-minion || {
+                    _warning_log "$0:${FUNCNAME[0]} stopping existing Salt "\
+                        "functionality salt-minion encountered difficulties "\
+                        "using systemctl, retcode '$?'";
+                    systemctl_issue=1;
+                }
+                if [[ "${systemctl_issue}" -eq 0 ]]; then
+                    CURRENT_STATUS=${STATUS_CODES_ARY[installedStopped]}
+                    _retn_status=${STATUS_CODES_ARY[installedStopped]}
+                else
+                    CURRENT_STATUS=${STATUS_CODES_ARY[installedStopped]}
+                    _retn_status=${STATUS_CODES_ARY[installedStopped]}
+                    _error_log "$0:${FUNCNAME[0]} stopping existing Salt "\
+                        "functionality salt-minion encountered difficulties "\
+                        "using systemctl, run 'systemctl status salt-minion'"\
+                        "to resolve issue'";
+                fi
             fi
         fi
     fi
 
+    _debug_log "$0:${FUNCNAME[0]} stop returning '${_retn_status}'"
     return ${_retn_status}
 }
 
 
+#
+# _restart_fn
+#
+#   restart the salt-minion if not running and return the current status
+#
+#       0 => installed (and running)
+#       1 => installing
+#       2 => notInstalled
+#       3 => installFailed
+#       4 => removing
+#       5 => removeFailed
+#       6 => externalInstall
+#       7 => installedStopped
+#       126 => scriptFailed
+#
+# Side Effects:
+#   CURRENT_STATUS updated
+#
+# Results:
+#   Exits numerical status
+#
+
+_restart_fn() {
+
+    # return status
+    local _retn_status=${STATUS_CODES_ARY[notInstalled]}
+    local install_onedir_chk=0
+    local found_salt_ver=""
+    local systemctl_issue=0
+
+    _info_log "$0:${FUNCNAME[0]} checking status for script"
+
+    _check_multiple_script_running
+
+    found_salt_ver=$(_check_classic_minion_install)
+    if [[ -n "${found_salt_ver}" ]]; then
+        _debug_log "$0:${FUNCNAME[0]}" \
+            "existing Standard Classic Salt Installation detected, "\
+            "Salt version: '${found_salt_ver}'"
+            CURRENT_STATUS=${STATUS_CODES_ARY[externalInstall]}
+            _retn_status=${STATUS_CODES_ARY[externalInstall]}
+    else
+        _debug_log "$0:${FUNCNAME[0]} no standardized classic install found"
+
+        install_onedir_chk=$(_check_onedir_minion_install)
+        if [[ ${install_onedir_chk} -eq 2 ]]; then
+            POST_3005_FLAG=1    # ensure note 3006 and above
+        fi
+
+        if [[ ${install_onedir_chk} -eq 0 ]]; then
+            # not installed
+            CURRENT_STATUS=${STATUS_CODES_ARY[notInstalled]}
+            _retn_status=${STATUS_CODES_ARY[notInstalled]}
+        elif [[ ${install_onedir_chk} -ne 0 ]]; then
+            # installed, check running
+            systemctl restart salt-minion || {
+                _warning_log "$0:${FUNCNAME[0]} restarting existing Salt "\
+                    "functionality salt-minion encountered difficulties "\
+                    "using systemctl, retcode '$?'";
+                systemctl_issue=1;
+            }
+            if [[ "${systemctl_issue}" -eq 0 ]]; then
+                CURRENT_STATUS=${STATUS_CODES_ARY[installed]}
+                _retn_status=${STATUS_CODES_ARY[installed]}
+            else
+                CURRENT_STATUS=${STATUS_CODES_ARY[installed]}
+                _retn_status=${STATUS_CODES_ARY[installed]}
+                _error_log "$0:${FUNCNAME[0]} restarting existing Salt "\
+                    "functionality salt-minion encountered difficulties "\
+                    "using systemctl, run 'systemctl status salt-minion'"\
+                    "to resolve issue'";
+            fi
+        fi
+    fi
+    _debug_log "$0:${FUNCNAME[0]} restart returning '${_retn_status}'"
+    return ${_retn_status}
+}
+
+
+
 #
 # _deps_chk_fn
 #
@@ -1723,6 +1639,78 @@ _find_system_lib_path () {
 }
 
 
+#
+# _reconfig_fn
+#
+# Executes scripts to stop the salt-minion, if active
+# Re-read the configuration
+# Restart the salt-minion, if it had been active
+#
+# Results:
+#   Exits with 0 or error code
+#
+_reconfig_fn () {
+    local _retn=0
+    local minion_was_active=""
+
+    _info_log "$0:${FUNCNAME[0]} processing script install"
+
+    _check_multiple_script_running
+
+    found_salt_ver=$(_check_classic_minion_install)
+    if [[ -n "${found_salt_ver}" ]]; then
+        _warning_log "$0:${FUNCNAME[0]} failed to install, "\
+            "existing Standard Classic Salt Installation detected, "\
+            "Salt version: '${found_salt_ver}'"
+        CURRENT_STATUS=${STATUS_CODES_ARY[externalInstall]}
+        exit ${STATUS_CODES_ARY[externalInstall]}
+    else
+        _debug_log "$0:${FUNCNAME[0]} no standardized classic install found"
+    fi
+
+    minion_was_active=$(systemctl is-active salt-minion) || {
+        _error_log "$0:${FUNCNAME[0]} checking running existing salt-minion "\
+            "encountered difficulties using systemctl, retcode '$?'";
+        }
+
+    # get configuration for salt-minion
+    _fetch_vmtools_salt_minion_conf "$@" || {
+        _error_log "$0:${FUNCNAME[0]} failed, read configuration for "\
+            "salt-minion, retcode '$?'";
+    }
+
+    # ensure minion id or fqdn for salt-minion
+    _ensure_id_or_fqdn
+
+    cd "${CURRDIR}" || return $?
+
+    # restart the salt-minion using systemd if it was active at the start
+    systemctl daemon-reload || {
+        _error_log "$0:${FUNCNAME[0]} reloading the systemd daemon "\
+            "failed , retcode '$?'";
+    }
+    _debug_log "$0:${FUNCNAME[0]} successfully executed systemctl "\
+        "daemon-reload"
+    if [[ "${minion_was_active}" = "active" ]]; then
+        local name_service="salt-minion.service"
+        systemctl restart "${name_service}" || {
+            _error_log "$0:${FUNCNAME[0]} restarting the salt-minion using "\
+                "systemctl failed , retcode '$?'";
+        }
+        _debug_log "$0:${FUNCNAME[0]} successfully executed systemctl "\
+            "restart '${name_service}'"
+        systemctl enable "${name_service}" || {
+            _error_log "$0:${FUNCNAME[0]} enabling the salt-minion using "\
+                "systemctl failed , retcode '$?'";
+        }
+        _debug_log "$0:${FUNCNAME[0]} successfully executed systemctl "\
+            "enable '${name_service}'"
+    fi
+    return ${_retn}
+}
+
+
+
 #
 #  _install_fn
 #
@@ -1734,6 +1722,7 @@ _find_system_lib_path () {
 #
 
 _install_fn () {
+
     # execute install of Salt minion
     local _retn=0
     local existing_chk=""
@@ -1747,12 +1736,12 @@ _install_fn () {
     found_salt_ver=$(_check_classic_minion_install)
     if [[ -n "${found_salt_ver}" ]]; then
         _warning_log "$0:${FUNCNAME[0]} failed to install, "\
-            "existing Standard Salt Installation detected, "\
+            "existing Standard Classic Salt Installation detected, "\
             "Salt version: '${found_salt_ver}'"
         CURRENT_STATUS=${STATUS_CODES_ARY[externalInstall]}
         exit ${STATUS_CODES_ARY[externalInstall]}
     else
-        _debug_log "$0:${FUNCNAME[0]} no standardized install found"
+        _debug_log "$0:${FUNCNAME[0]} no standardized Classic install found"
     fi
 
     # check if salt-minion or salt-master (salt-cloud etc req master)
@@ -1763,9 +1752,17 @@ _install_fn () {
         do
             local salt_fn=""
             salt_fn="$(basename "${idx}")"
-            _warning_log "$0:${FUNCNAME[0]} existing Salt functionality "\
-                "${salt_fn} shall be stopped and replaced when new "\
-                "salt-minion is installed"
+            if [ "${UPGRADE_FLAG}" -eq 0 ]; then
+                # performing a clean install
+                _warning_log "$0:${FUNCNAME[0]} existing Salt functionality "\
+                    "${salt_fn} shall be stopped and replaced when new "\
+                    "salt-minion is installed"
+            else
+                # performing an upgrade, note in logs
+                _warning_log "$0:${FUNCNAME[0]} existing Salt functionality "\
+                    "${salt_fn} shall be stopped and upgraded when new "\
+                    "salt-minion is installed"
+            fi
         done
     fi
 
@@ -1776,10 +1773,17 @@ _install_fn () {
     }
 
     # get configuration for salt-minion
-    _fetch_vmtools_salt_minion_conf "$@" || {
-        _error_log "$0:${FUNCNAME[0]} failed, read configuration for "\
-            "salt-minion, retcode '$?'";
-    }
+    if [ "${UPGRADE_FLAG}" -eq 0 ]; then
+        # performing a clean install
+        _fetch_vmtools_salt_minion_conf "$@" || {
+            _error_log "$0:${FUNCNAME[0]} failed, read configuration for "\
+                "salt-minion, retcode '$?'";
+        }
+    else
+        # performing an upgrade, note in logs, and leave config alone
+        _debug_log "$0:${FUNCNAME[0]} performing upgrade, using existing "\
+            "read configuration for salt-minion";
+    fi
 
     if [[ ${_retn} -eq 0 && -f "${onedir_pre_3006_location}" ]]; then
         # create helper scripts for /usr/bin to ensure they are present
@@ -2002,7 +2006,7 @@ _generate_minion_id () {
 #   re-generates new identifier, allows for a VM containing a salt-minion,
 #   to be cloned and not have conflicting id and keys
 #   salt-minion is stopped, id and keys cleared, and restarted
-#   if it was previously running
+#   if it was previously running, and not an upgrade
 #
 # Input:
 #   Optional specified input ID to be used, default generate randomized value
@@ -2058,25 +2062,34 @@ _clear_id_key_fn () {
         salt_minion_pre_active_flag=1
     fi
 
-    rm -fR "${salt_conf_dir}/minion_id"
-    rm -fR "${salt_conf_dir}/pki/${salt_minion_conf_name}"
-    # always comment out what was there
-    sed -i 's/^id/# id/g' "${salt_minion_conf_file}"
-    _debug_log "$0:${FUNCNAME[0]} removed '${salt_conf_dir}/minion_id' "\
-        "and '${salt_conf_dir}/pki/${salt_minion_conf_name}', and "\
-        "commented out id in '${salt_minion_conf_file}'"
+    if [ "${UPGRADE_FLAG}" -eq 0 ]; then
+        # perform a clean install and generate new keys and minion id
+        rm -fR "${salt_conf_dir}/minion_id"
+        rm -fR "${salt_conf_dir}/pki/${salt_minion_conf_name}"
+        # always comment out what was there
+        sed -i 's/^id/# id/g' "${salt_minion_conf_file}"
+        _debug_log "$0:${FUNCNAME[0]} removed '${salt_conf_dir}/minion_id' "\
+            "and '${salt_conf_dir}/pki/${salt_minion_conf_name}', and "\
+            "commented out id in '${salt_minion_conf_file}'"
+
+        if [[ -z "${minion_ip_id}" ]] ;then
+            minion_id=$(_generate_minion_id)
+        else
+            minion_id="${minion_ip_id}"
+        fi
 
-    if [[ -z "${minion_ip_id}" ]] ;then
-        minion_id=$(_generate_minion_id)
+        # add new minion id to bottom of minion configuration file
+        echo "id: ${minion_id}" >> "${salt_minion_conf_file}"
+        _debug_log "$0:${FUNCNAME[0]} updated salt-minion identifier "\
+            "'${minion_id}' in configuration file '${salt_minion_conf_file}'"
     else
+        # performing an upgrade, log info
         minion_id="${minion_ip_id}"
+        _debug_log "$0:${FUNCNAME[0]} maintaining salt-minion identifier "\
+            "'${minion_id}' and keys in configuration file "\
+            "'${salt_minion_conf_file}' since performing upgrade"
     fi
 
-    # add new minion id to bottom of minion configuration file
-    echo "id: ${minion_id}" >> "${salt_minion_conf_file}"
-    _debug_log "$0:${FUNCNAME[0]} updated salt-minion identifier "\
-        "'${minion_id}' in configuration file '${salt_minion_conf_file}'"
-
     if [[ ${salt_minion_pre_active_flag} -eq 1 ]]; then
         # restart the stopped salt-minion using systemd
         systemctl restart salt-minion || {
@@ -2097,11 +2110,15 @@ _clear_id_key_fn () {
 #
 #   Removes all Salt files and directories that may be used
 #
+# Note:
+#   funciton only call when performing an uninstall
+#
 # Results:
 #   Exits with 0 or error code
 #
 
 _remove_installed_files_dirs() {
+    # performing an uninstall
     _debug_log "$0:${FUNCNAME[0]} removing directories and files "\
         "in '${list_file_dirs_to_remove}'"
     for idx in ${list_file_dirs_to_remove}
@@ -2141,12 +2158,12 @@ _uninstall_fn () {
     found_salt_ver=$(_check_classic_minion_install)
     if [[ -n "${found_salt_ver}" ]]; then
         _warning_log "$0:${FUNCNAME[0]} failed to install, "\
-            "existing Standard Salt Installation detected, "\
+            "existing Standard Classic Salt Installation detected, "\
             "Salt version: '${found_salt_ver}'"
         CURRENT_STATUS=${STATUS_CODES_ARY[externalInstall]}
         exit ${STATUS_CODES_ARY[externalInstall]}
     else
-        _debug_log "$0:${FUNCNAME[0]} no standardized install found"
+        _debug_log "$0:${FUNCNAME[0]} no standardized classic install found"
     fi
 
     install_onedir_chk=$(_check_onedir_minion_install)
@@ -2349,6 +2366,19 @@ while true; do
             shift;
             MINION_VERSION_PARAMS="$*";
             ;;
+        -n | --reconfig )
+            RECONFIG_FLAG=1;
+            shift;
+            RECONFIG_PARAMS="$*";
+            ;;
+        -q | --stop )
+            STOP_FLAG=1;
+            shift;
+            ;;
+        -p | --start )
+            RESTART_FLAG=1;
+            shift;
+            ;;
         -r | --remove )
             UNINSTALL_FLAG=1;
             shift;
@@ -2361,6 +2391,11 @@ while true; do
             VERSION_FLAG=1;
             shift;
             ;;
+        -u | --upgrade )
+            UPGRADE_FLAG=1;
+            shift;
+            ;;
+
         -- )
             shift;
             break;
@@ -2413,6 +2448,11 @@ if [[ ${MINION_VERSION_FLAG} -eq 1 ]]; then
     _set_install_minion_version_fn "${MINION_VERSION_PARAMS}"
     retn=$?
 fi
+if [[ ${UPGRADE_FLAG} -eq 1 ]]; then
+    CLI_ACTION=1
+    # ensure this is processed before install
+    retn=$?
+fi
 if [[ ${INSTALL_FLAG} -eq 1 ]]; then
     CLI_ACTION=1
     LOG_ACTION="install"
@@ -2436,6 +2476,24 @@ if [[ ${VERSION_FLAG} -eq 1 ]]; then
     echo "${SCRIPT_VERSION}"
     retn=0
 fi
+if [[ ${RECONFIG_FLAG} -eq 1 ]]; then
+    CLI_ACTION=1
+    LOG_ACTION="reconfig"
+    _reconfig_fn "${RECONFIG_PARAMS}"
+    retn=$?
+fi
+if [[ ${STOP_FLAG} -eq 1 ]]; then
+    CLI_ACTION=1
+    LOG_ACTION="default"
+    _stop_fn
+    retn=$?
+fi
+if [[ ${RESTART_FLAG} -eq 1 ]]; then
+    CLI_ACTION=1
+    LOG_ACTION="default"
+    _restart_fn
+    retn=$?
+fi
 
 if [[ ${CLI_ACTION} -eq 0 ]]; then
     # check if guest variables have an action since none from CLI
@@ -2468,6 +2526,7 @@ if [[ ${CLI_ACTION} -eq 0 ]]; then
                 _status_fn
                 retn=$?
                 ;;
+            # TBD what will VM TOOLS do for reconfig, upgrade, stop and start ?
             *)
                 ;;
         esac