|
12 | 12 |
|
13 | 13 | if [ "$(systemctl is-active boot-complete.target)" = "active" ]; then
|
14 | 14 | # 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 |
16 | 19 | else
|
17 | 20 | # 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' |
21 | 24 | fi
|
22 | 25 | # 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' |
26 | 29 | fi
|
27 | 30 | fi
|
28 | 31 |
|
|
32 | 35 |
|
33 | 36 | # TODO: Show initial/max and current boot_counter values in status
|
34 | 37 | # 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)"||"" |
36 | 39 | if [ -n "$fallback_info" ]; then
|
37 |
| - status+="$fallback_info" |
| 40 | + status+="$fallback_info"$'\n' |
38 | 41 | fi
|
39 | 42 |
|
40 | 43 | echo -n "$status" | tee /run/motd.d/boot-status
|
0 commit comments