Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker-platform-monitor] Check if sonic_platform package is available before checking if installed #5764

Merged
merged 1 commit into from
Nov 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dockers/docker-platform-monitor/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ -e /usr/share/sonic/platform/platform_wait ]; then
fi

# If the Python 2 sonic-platform package is not installed, try to install it
pip2 show sonic-platform > /dev/null 2>&1
python2 -c "import sonic_platform" > /dev/null 2>&1 || pip2 show sonic-platform > /dev/null 2>&1
if [ $? -ne 0 ]; then
SONIC_PLATFORM_WHEEL="/usr/share/sonic/platform/sonic_platform-1.0-py2-none-any.whl"
echo "sonic-platform package not installed, attempting to install..."
Expand All @@ -33,7 +33,7 @@ if [ $? -ne 0 ]; then
fi

# If the Python 3 sonic-platform package is not installed, try to install it
pip3 show sonic-platform > /dev/null 2>&1
python3 -c "import sonic_platform" > /dev/null 2>&1 || pip3 show sonic-platform > /dev/null 2>&1
if [ $? -ne 0 ]; then
SONIC_PLATFORM_WHEEL="/usr/share/sonic/platform/sonic_platform-1.0-py3-none-any.whl"
echo "sonic-platform package not installed, attempting to install..."
Expand Down