[Barefoot] [201911] Fix default profile for Newport (#6307)
Fix default profile for Newport platform Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
This commit is contained in:
parent
dea38d1558
commit
64acd48012
29
device/barefoot/x86_64-accton_as9516_32d-r0/syncd.conf
Normal file
29
device/barefoot/x86_64-accton_as9516_32d-r0/syncd.conf
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
y_profile_set() {
|
||||
P4_PROFILE=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["p4_profile"]')
|
||||
if [[ -n "$P4_PROFILE" || ( ! -L /opt/bfn/install && -e /opt/bfn/install ) ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ $(readlink /opt/bfn/install) =~ "install_y" ]]; then
|
||||
echo "/opt/bfn/install is a link to Y profile"
|
||||
return
|
||||
fi
|
||||
|
||||
Y_PROFILE=$(ls -d /opt/bfn/install_y*_profile 2> /dev/null | head -1)
|
||||
if [[ -z $Y_PROFILE ]]; then
|
||||
echo "No P4 profile found for Newport"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Link /opt/bfn/install to $Y_PROFILE"
|
||||
ln -srfn $Y_PROFILE /opt/bfn/install
|
||||
}
|
||||
|
||||
(
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
y_profile_set
|
||||
)
|
Reference in New Issue
Block a user