Skip to content

Commit c0a6a67

Browse files
committed
greenboot-status: Add explicit .service to journal queries
1 parent 58e1dab commit c0a6a67

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

usr/libexec/greenboot/greenboot-status

+12-9
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ fi
1212

1313
if [ "$(systemctl is-active boot-complete.target)" = "active" ]; then
1414
# greenboot logs (post healthchecks) from current boot
15-
status+="$(journalctl -u greenboot-task-runner -p 5 -b -0 -o cat)"$'\n'
15+
greenboot_runner_info="$(journalctl -u greenboot-task-runner.service -p 5 -b -0 -o cat)"||""
16+
if [ -n "$greenboot_runner_info" ]; then
17+
status+="$greenboot_runner_info"$'\n'
18+
fi
1619
else
1720
# redboot logs (post healthchecks) from current boot
18-
redboot_info+="$(journalctl -u redboot-task-runner -p 0 -b -0 -o cat)"||""
19-
if [ -n "$redboot_info" ]; then
20-
status+="$redboot_info"$'\n'
21+
redboot_runner_info="$(journalctl -u redboot-task-runner.service -p 0 -b -0 -o cat)"||""
22+
if [ -n "$redboot_runner_info" ]; then
23+
status+="$redboot_runner_info"$'\n'
2124
fi
2225
# redboot-auto-reboot.service logs (post redboot-task-runner.service) from current boot
23-
reboot_info="$(journalctl -u redboot-auto-reboot -p 1 -b -0 -o cat)"||""
24-
if [ -n "$reboot_info" ]; then
25-
status+="$reboot_info"
26+
redboot_reboot_info="$(journalctl -u redboot-auto-reboot.service -p 1 -b -0 -o cat)"||""
27+
if [ -n "$redboot_reboot_info" ]; then
28+
status+="$redboot_reboot_info"$'\n'
2629
fi
2730
fi
2831

@@ -32,9 +35,9 @@ fi
3235

3336
# TODO: Show initial/max and current boot_counter values in status
3437
# If this is a fallback boot (i.e. the countdown has reached its end), show logs from previous boot
35-
fallback_info="$(journalctl -u greenboot-rpm-ostree-grub2-check-fallback -b -0 -p 3 -o cat)"||""
38+
fallback_info="$(journalctl -u greenboot-rpm-ostree-grub2-check-fallback.service -b -0 -p 3 -o cat)"||""
3639
if [ -n "$fallback_info" ]; then
37-
status+="$fallback_info"
40+
status+="$fallback_info"$'\n'
3841
fi
3942

4043
echo -n "$status" | tee /run/motd.d/boot-status

0 commit comments

Comments
 (0)