Merge ~ahasenack/ubuntu/+source/ubuntu-advantage-tools:bionic-reorder-motd into ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: 3577cb6368ad4a34f38d2397e62ddf630a16d8b6
Proposed branch: ~ahasenack/ubuntu/+source/ubuntu-advantage-tools:bionic-reorder-motd
Merge into: ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel
Diff against target: 69 lines (+14/-4)
5 files modified
debian/changelog (+8/-0)
debian/ubuntu-advantage-tools.maintscript (+2/-0)
tests/test_livepatch_motd.py (+1/-1)
update-motd.d/80-esm (+0/-0)
update-motd.d/80-livepatch (+3/-3)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Core Reviewers Pending
Review via email: mp+341763@code.launchpad.net

Description of the change

Move our motd scripts to an earlier place and leave the last positions for more urgent messages.

Before: https://pastebin.ubuntu.com/p/dnfjrmpSZH/
After: https://pastebin.ubuntu.com/p/C7dczsPc2H/

The new placement showed a small formatting problem in that double blank lines were showing up, so that was fixed too.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

- Ack to the proposed changes (UI wise)
- Ack to the packaging changes (I was confused at the lack of a -install change, but the wildcard
  in the Makefile handles that)
- On upgrade files are correctly moved
- no other upgrade issues
- also good on a new install
- the (up to) 24h delay after remove/reinstall is known and ok
- new output looks good

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, can you please push the upload tag and dput? I'll watch excuses

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Tag and dput done as requested

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 0215a81..9c328f7 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+ubuntu-advantage-tools (15) bionic; urgency=medium
7+
8+ * Rename motd scripts so they are shown a bit earlier (LP: #1757171)
9+ * Move empty line placement in the livepatch motd to the beginning of the
10+ message to avoid double blank lines.
11+
12+ -- Andreas Hasenack <andreas@canonical.com> Tue, 20 Mar 2018 16:44:31 -0300
13+
14 ubuntu-advantage-tools (14) bionic; urgency=medium
15
16 * New upstream release:
17diff --git a/debian/ubuntu-advantage-tools.maintscript b/debian/ubuntu-advantage-tools.maintscript
18new file mode 100644
19index 0000000..5a8cb58
20--- /dev/null
21+++ b/debian/ubuntu-advantage-tools.maintscript
22@@ -0,0 +1,2 @@
23+mv_conffile /etc/update-motd.d/99-livepatch /etc/update-motd.d/80-livepatch 15~
24+mv_conffile /etc/update-motd.d/99-esm /etc/update-motd.d/80-esm 15~
25diff --git a/tests/test_livepatch_motd.py b/tests/test_livepatch_motd.py
26index e3ef050..c8beeda 100644
27--- a/tests/test_livepatch_motd.py
28+++ b/tests/test_livepatch_motd.py
29@@ -59,7 +59,7 @@ class LivepatchMOTDTest(UbuntuAdvantageTest):
30 SERIES = 'trusty'
31 ARCH = 'x86_64'
32 KERNEL_VERSION = '4.4.0-89-generic'
33- SCRIPT = 'update-motd.d/99-livepatch'
34+ SCRIPT = 'update-motd.d/80-livepatch'
35
36 def setUp(self):
37 super().setUp()
38diff --git a/update-motd.d/99-esm b/update-motd.d/80-esm
39index 0857621..0857621 100755
40--- a/update-motd.d/99-esm
41+++ b/update-motd.d/80-esm
42diff --git a/update-motd.d/99-livepatch b/update-motd.d/80-livepatch
43index b900449..de59bf1 100755
44--- a/update-motd.d/99-livepatch
45+++ b/update-motd.d/80-livepatch
46@@ -74,20 +74,20 @@ case "$livepatch_status" in
47 # do nothing
48 ;;
49 "enabled")
50+ echo
51 echo " * Canonical Livepatch is enabled."
52 print_status "${check_state}" "${patch_state}"
53- echo
54 ;;
55 "disabled")
56+ echo
57 echo " * Canonical Livepatch is available for installation."
58 echo " - Reduce system reboots and improve kernel security. Activate at:"
59 echo " https://ubuntu.com/livepatch"
60- echo
61 ;;
62 *)
63+ echo
64 echo " * Canonical Livepatch is in an unknown state."
65 echo " - Please see /var/log/syslog for more information."
66 echo " Status: \"$livepatch_status\""
67- echo
68 ;;
69 esac

Subscribers

People subscribed via source and target branches

to status/vote changes: