Merge ~rbalint/finalrd:master into finalrd:master

Proposed by Balint Reczey
Status: Merged
Merged at revision: 482793245413eb4fa03c437d79381f5db5cdbbc5
Proposed branch: ~rbalint/finalrd:master
Merge into: finalrd:master
Diff against target: 21 lines (+5/-1)
1 file modified
finalrd-rebootspeed.sh (+5/-1)
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Pending
Canonical Foundations Team Pending
Review via email: mp+364257@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/finalrd-rebootspeed.sh b/finalrd-rebootspeed.sh
2index db6a917..8eaf1ee 100755
3--- a/finalrd-rebootspeed.sh
4+++ b/finalrd-rebootspeed.sh
5@@ -21,11 +21,15 @@ done
6 newboot_id=$((reboot_id+1))
7
8 reboot_start=$(journalctl -q -b $reboot_id -o short-unix --no-pager -u systemd-logind SHUTDOWN=reboot | sed 's/ .*//')
9-[ -z "$reboot_start" ] && exit 1
10+if [ -z "$reboot_start" ] ; then
11+ printf "No reboot marker was found, please reboot using:\n sudo dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:false\n" >&2
12+ exit 1
13+fi
14
15 journal_end=$(journalctl -q -b $reboot_id -o short-unix --no-pager -u systemd-journald -r -n 1 | sed 's/ .*//')
16 boot_start=$(journalctl -q -b $newboot_id -o short-unix -k | head -n 1 | sed 's/ .*//')
17
18+
19 tx_time=$(echo $journal_end - $reboot_start | bc)
20 void_time=$(echo $boot_start - $journal_end | bc)
21 reboot_time=$(echo $boot_start - $reboot_start | bc)

Subscribers

People subscribed via source and target branches