From 2dfcd27d104eef6292b51f69bec72b40134a4b25 Mon Sep 17 00:00:00 2001 From: Hook25 Date: Tue, 29 Apr 2025 16:21:12 +0200 Subject: [PATCH] Change the user on failed service check This is needed because the logs collection needs enough permissions and on some platforms the "normal" user doesn't have them --- providers/base/units/power-management/jobs.pxu | 8 +++++--- providers/base/units/watchdog/jobs.pxu | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/providers/base/units/power-management/jobs.pxu b/providers/base/units/power-management/jobs.pxu index 38503ff51b..a59af59c98 100644 --- a/providers/base/units/power-management/jobs.pxu +++ b/providers/base/units/power-management/jobs.pxu @@ -204,7 +204,7 @@ requires: cpuinfo.other != 'emulated by qemu' user: root environ: RTC_DEVICE_FILE -command: +command: if [[ -n "$RTC_DEVICE_FILE" ]]; then rtc_path="/sys/class/rtc/${RTC_DEVICE_FILE/#\/dev\/}" else @@ -381,6 +381,7 @@ category_id: com.canonical.plainbox::power-management _summary: Post warm reboot service check _purpose: Check there are no failed services after the warm reboot unit: job +user: root plugin: shell command: failed_service_check.sh estimated_duration: 1.0 @@ -411,6 +412,7 @@ category_id: com.canonical.plainbox::power-management _summary: Post cold reboot service check _purpose: Check there are no failed services after the cold reboot unit: job +user: root plugin: shell command: failed_service_check.sh estimated_duration: 1.0 @@ -550,13 +552,13 @@ command: light_sensor_test.sh _purpose: This test will check your Ambient Light Sensor work, if you don't have it, please skip this test. _steps: - 1. Make sure "Automatic brightness" is ON in Power settings. + 1. Make sure "Automatic brightness" is ON in Power settings. 2. Locate the Ambient Light Sensor, which should be around the Camera. 3. Cover your hand over the Ambient Light Sensor. 4. When the backlight dims, press Enter to start testing. 5. Wait until the message "Has ambient light sensor" is printed on the screen and wave your hand slowly during testing. _verification: - Did the Ambient Light Sensor values change when you _shook_ your hands over the sensor? + Did the Ambient Light Sensor values change when you _shook_ your hands over the sensor? Did the Screen backlight also change? _summary: Test the functionality of the Ambient Light Sensor by checking if sensor values and screen backlight change when covered. diff --git a/providers/base/units/watchdog/jobs.pxu b/providers/base/units/watchdog/jobs.pxu index dea139f14d..023407a1ab 100644 --- a/providers/base/units/watchdog/jobs.pxu +++ b/providers/base/units/watchdog/jobs.pxu @@ -37,6 +37,7 @@ category_id: com.canonical.plainbox::power-management _summary: Post watchdog reset service check _purpose: Check there are no failed services after the watchdog triggered unit: job +user: root plugin: shell command: failed_service_check.sh estimated_duration: 1.0