From dfc023721aefc427255e996f7589450296836de3 Mon Sep 17 00:00:00 2001 From: Alexandru Costache Date: Mon, 11 Nov 2024 11:02:10 +0200 Subject: [PATCH 1/2] recipes-support/os-fan-profile: Don't print logs unless configured Supervisor PR #2382 adds log streaming for this service. Let's not print any logs in the dashboard for devices which don't support configurable fan profiles, unless a value is specified in config.json, to avoid any confusion. Change-type: patch Signed-off-by: Alexandru Costache --- .../os-fan-profile/os-fan-profile/os-fan-profile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta-balena-common/recipes-support/os-fan-profile/os-fan-profile/os-fan-profile b/meta-balena-common/recipes-support/os-fan-profile/os-fan-profile/os-fan-profile index b434be7367..cd599a6d4b 100644 --- a/meta-balena-common/recipes-support/os-fan-profile/os-fan-profile/os-fan-profile +++ b/meta-balena-common/recipes-support/os-fan-profile/os-fan-profile/os-fan-profile @@ -3,5 +3,11 @@ set -e . /usr/libexec/os-helpers-logging +source /usr/sbin/balena-config-vars --no-cache -info "Fan profile configuration is not supported for this device type." +if [[ -z "$OS_FAN_PROFILE" ]]; then + # No fan profile configured + : +else + info "Fan profile configuration is not supported for this device type." +fi From 7578815ef39a97b5743230a49a48fd830ea66a0c Mon Sep 17 00:00:00 2001 From: Alexandru Costache Date: Mon, 11 Nov 2024 11:08:07 +0200 Subject: [PATCH 2/2] recipes-support/os-power-mode: Don't print logs unless configured Supervisor PR #2382 adds log streaming for this service. Let's not print any logs in the dashboard for devices which don't support configurable power modes, unless a value is specified in config.json, to avoid any potential confusion. Signed-off-by: Alexandru Costache --- .../os-power-mode/os-power-mode/os-power-mode | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta-balena-common/recipes-support/os-power-mode/os-power-mode/os-power-mode b/meta-balena-common/recipes-support/os-power-mode/os-power-mode/os-power-mode index f47a2bf07e..68146f907a 100644 --- a/meta-balena-common/recipes-support/os-power-mode/os-power-mode/os-power-mode +++ b/meta-balena-common/recipes-support/os-power-mode/os-power-mode/os-power-mode @@ -3,5 +3,11 @@ set -e . /usr/libexec/os-helpers-logging +source /usr/sbin/balena-config-vars --no-cache -info "Power mode configuration is not supported for this device type." +if [[ -z "$OS_POWER_MODE" ]]; then + # No power mode configured + : +else + info "Power mode configuration is not supported for this device type." +fi