From 032b8379e7a1dd4dd2a5957074a5d1a29b2767dc Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Wed, 4 Aug 2021 18:30:54 +0800 Subject: [PATCH 1/2] Update sensor conf for SN4410 A1 system --- .../get_sensors_conf_path | 21 +++++++++++++++++++ .../x86_64-mlnx_msn4410-r0/sensors.conf.a1 | 1 + 2 files changed, 22 insertions(+) create mode 100755 device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path create mode 120000 device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path new file mode 100755 index 000000000000..c347d7435416 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path @@ -0,0 +1,21 @@ +#!/bin/bash + +HW_VERSION="/var/run/hw-management/system/config1" +SENSORS_CONF_FILE="/usr/share/sonic/platform/sensors.conf" +SENSORS_CONF_FILE_A1="/usr/share/sonic/platform/sensors.conf.a1" + +function get_sensor_conf_path() { + local _HW_VERSION="0" + if [[ -e $HW_VERSION ]]; then + _HW_VERSION=$(cat $HW_VERSION 2>&1) + if [[ "$_HW_VERSION" == "1" ]]; then + if [[ -e $SENSORS_CONF_FILE_A1 ]]; then + echo $SENSORS_CONF_FILE_A1 + return + fi + fi + fi + echo $SENSORS_CONF_FILE +} + +get_sensor_conf_path diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 b/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 new file mode 120000 index 000000000000..4605d556f315 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 @@ -0,0 +1 @@ +../x86_64-mlnx_msn4700-r0/sensors.conf.a1 \ No newline at end of file From 0071cf06bb5adfa7efd7ebaf911be64c2882bd34 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Mon, 9 Aug 2021 10:29:01 +0800 Subject: [PATCH 2/2] change get_sensors_conf_path to use symbolink --- .../get_sensors_conf_path | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) mode change 100755 => 120000 device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path deleted file mode 100755 index c347d7435416..000000000000 --- a/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -HW_VERSION="/var/run/hw-management/system/config1" -SENSORS_CONF_FILE="/usr/share/sonic/platform/sensors.conf" -SENSORS_CONF_FILE_A1="/usr/share/sonic/platform/sensors.conf.a1" - -function get_sensor_conf_path() { - local _HW_VERSION="0" - if [[ -e $HW_VERSION ]]; then - _HW_VERSION=$(cat $HW_VERSION 2>&1) - if [[ "$_HW_VERSION" == "1" ]]; then - if [[ -e $SENSORS_CONF_FILE_A1 ]]; then - echo $SENSORS_CONF_FILE_A1 - return - fi - fi - fi - echo $SENSORS_CONF_FILE -} - -get_sensor_conf_path diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path new file mode 120000 index 000000000000..f1509a1e1d3d --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path @@ -0,0 +1 @@ +../x86_64-mlnx_msn4700-r0/get_sensors_conf_path \ No newline at end of file