diff --git a/hack/support-bundle-collector.sh b/hack/support-bundle-collector.sh index f23985e0..c4c6cf84 100755 --- a/hack/support-bundle-collector.sh +++ b/hack/support-bundle-collector.sh @@ -15,15 +15,15 @@ BUNDLE_DIR="${OUTPUT_DIR}/${NODE_NAME}" mkdir -p ${BUNDLE_DIR} -OS_ID=$(bash -c "source $HOST_PATH/etc/os-release && echo \$ID") -if [ -z "$OS_ID" ]; then - echo "Unable to determine OS ID" - exit 1 -fi - if [ -n "$SUPPORT_BUNDLE_COLLECTOR" ]; then OS_COLLECTOR="collector-$SUPPORT_BUNDLE_COLLECTOR" else + OS_ID=$(bash -c "source ${HOST_PATH}/etc/os-release && echo \$ID") + if [ -z "$OS_ID" ]; then + echo "Unable to determine OS ID" + exit 1 + fi + OS_COLLECTOR="collector-$OS_ID" fi echo "OS_COLLECTOR="${OS_COLLECTOR}