Skip to content

Commit

Permalink
fix: add os distro fault tolerant in support bundle collector
Browse files Browse the repository at this point in the history
Longhorn 5670

Signed-off-by: Ray Chang <ray.chang@suse.com>
  • Loading branch information
weizhe0422 authored and David Ko committed Mar 28, 2023
1 parent 0e19076 commit e4d79c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hack/support-bundle-collector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit e4d79c8

Please sign in to comment.