diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/debian/postinst b/platform/barefoot/sonic-platform-modules-bfn-montara/debian/postinst new file mode 100755 index 000000000000..a218d59e2652 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/debian/postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +PLATFORM_NAME=x86_64-accton_wedge100bf_32x-r0 +SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl" +python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2} +SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl" +python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3} + +#DEBHELPER# diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/postinst b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/postinst index a89ac4f4f5b2..90d772ef89df 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/postinst +++ b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/postinst @@ -1,6 +1,27 @@ #!/bin/sh set -e -depmod -a +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# diff --git a/platform/barefoot/sonic-platform-modules-bfn/debian/postinst b/platform/barefoot/sonic-platform-modules-bfn/debian/postinst new file mode 100644 index 000000000000..bd24c078778a --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn/debian/postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +PLATFORM_NAME=x86_64-accton_wedge100bf_65x-r0 +SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl" +python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2} +SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl" +python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3} + +#DEBHELPER#