Skip to content

Commit cc2ae6d

Browse files
Hook25aglinserer
authored andcommitted
Change the user on failed service check (bugfix) (canonical#1894)
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
1 parent c712044 commit cc2ae6d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

providers/base/units/power-management/jobs.pxu

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ requires:
204204
cpuinfo.other != 'emulated by qemu'
205205
user: root
206206
environ: RTC_DEVICE_FILE
207-
command:
207+
command:
208208
if [[ -n "$RTC_DEVICE_FILE" ]]; then
209209
rtc_path="/sys/class/rtc/${RTC_DEVICE_FILE/#\/dev\/}"
210210
else
@@ -381,6 +381,7 @@ category_id: com.canonical.plainbox::power-management
381381
_summary: Post warm reboot service check
382382
_purpose: Check there are no failed services after the warm reboot
383383
unit: job
384+
user: root
384385
plugin: shell
385386
command: failed_service_check.sh
386387
estimated_duration: 1.0
@@ -411,6 +412,7 @@ category_id: com.canonical.plainbox::power-management
411412
_summary: Post cold reboot service check
412413
_purpose: Check there are no failed services after the cold reboot
413414
unit: job
415+
user: root
414416
plugin: shell
415417
command: failed_service_check.sh
416418
estimated_duration: 1.0
@@ -550,13 +552,13 @@ command: light_sensor_test.sh
550552
_purpose:
551553
This test will check your Ambient Light Sensor work, if you don't have it, please skip this test.
552554
_steps:
553-
1. Make sure "Automatic brightness" is ON in Power settings.
555+
1. Make sure "Automatic brightness" is ON in Power settings.
554556
2. Locate the Ambient Light Sensor, which should be around the Camera.
555557
3. Cover your hand over the Ambient Light Sensor.
556558
4. When the backlight dims, press Enter to start testing.
557559
5. Wait until the message "Has ambient light sensor" is printed on the screen and wave your hand slowly during testing.
558560
_verification:
559-
Did the Ambient Light Sensor values change when you _shook_ your hands over the sensor?
561+
Did the Ambient Light Sensor values change when you _shook_ your hands over the sensor?
560562
Did the Screen backlight also change?
561563
_summary: Test the functionality of the Ambient Light Sensor by checking if sensor values and screen backlight change when covered.
562564

providers/base/units/watchdog/jobs.pxu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ category_id: com.canonical.plainbox::power-management
3737
_summary: Post watchdog reset service check
3838
_purpose: Check there are no failed services after the watchdog triggered
3939
unit: job
40+
user: root
4041
plugin: shell
4142
command: failed_service_check.sh
4243
estimated_duration: 1.0

0 commit comments

Comments
 (0)