diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index ab22004..df9da6e 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -10,3 +10,5 @@ jobs: - uses: actions/checkout@v2 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master + env: + SHELLCHECK_OPTS: -e SC2317 diff --git a/minione b/minione index 15fe16f..aae7bc6 100755 --- a/minione +++ b/minione @@ -322,7 +322,7 @@ get_distname_and_version() { [[ "${DIST}" = Red ]] && DIST="RedHat" elif [ -f /etc/os-release ]; then DIST=$(grep ^NAME= /etc/os-release | cut -d\" -f2) - DIST=$(echo $DIST | sed 's/ .*//') + DIST=${DIST%% *} # remove everything after a space VER=$(grep ^VERSION_ID= /etc/os-release | cut -d\" -f2) elif [ -f /etc/lsb-release ]; then DIST=$(grep ^DISTRIB_ID= /etc/lsb-release | cut -d= -f2)