sonic-buildimage/platform/barefoot/sonic-platform-modules-bfn-newport/debian/postinst

28 lines
1.0 KiB
Plaintext
Raw Normal View History

#!/bin/sh
set -e
depmod -a
systemctl enable bfn-newport.service
systemctl start bfn-newport.service
PLATFORM_NAME=x86_64-accton_as9516bf_32d-r0
SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl"
if [ -e ${SONIC_PLATFORM_WHEEL_PY2} ]; then
python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2}
fi
SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl"
if [ -e ${SONIC_PLATFORM_WHEEL_PY3} ]; then
python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3}
fi
PLATFORM_NAME=x86_64-accton_as9516_32d-r0
SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl"
if [ -e ${SONIC_PLATFORM_WHEEL_PY2} ]; then
python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2}
fi
SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl"
if [ -e ${SONIC_PLATFORM_WHEEL_PY3} ]; then
python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3}
fi
#DEBHELPER#