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
diff --git a/debian/changelog b/debian/changelog
index 0215a81..9c328f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1ubuntu-advantage-tools (15) bionic; urgency=medium
2
3 * Rename motd scripts so they are shown a bit earlier (LP: #1757171)
4 * Move empty line placement in the livepatch motd to the beginning of the
5 message to avoid double blank lines.
6
7 -- Andreas Hasenack <andreas@canonical.com> Tue, 20 Mar 2018 16:44:31 -0300
8
1ubuntu-advantage-tools (14) bionic; urgency=medium9ubuntu-advantage-tools (14) bionic; urgency=medium
210
3 * New upstream release:11 * New upstream release:
diff --git a/debian/ubuntu-advantage-tools.maintscript b/debian/ubuntu-advantage-tools.maintscript
4new file mode 10064412new file mode 100644
index 0000000..5a8cb58
--- /dev/null
+++ b/debian/ubuntu-advantage-tools.maintscript
@@ -0,0 +1,2 @@
1mv_conffile /etc/update-motd.d/99-livepatch /etc/update-motd.d/80-livepatch 15~
2mv_conffile /etc/update-motd.d/99-esm /etc/update-motd.d/80-esm 15~
diff --git a/tests/test_livepatch_motd.py b/tests/test_livepatch_motd.py
index e3ef050..c8beeda 100644
--- a/tests/test_livepatch_motd.py
+++ b/tests/test_livepatch_motd.py
@@ -59,7 +59,7 @@ class LivepatchMOTDTest(UbuntuAdvantageTest):
59 SERIES = 'trusty'59 SERIES = 'trusty'
60 ARCH = 'x86_64'60 ARCH = 'x86_64'
61 KERNEL_VERSION = '4.4.0-89-generic'61 KERNEL_VERSION = '4.4.0-89-generic'
62 SCRIPT = 'update-motd.d/99-livepatch'62 SCRIPT = 'update-motd.d/80-livepatch'
6363
64 def setUp(self):64 def setUp(self):
65 super().setUp()65 super().setUp()
diff --git a/update-motd.d/99-esm b/update-motd.d/80-esm
index 0857621..0857621 100755
--- a/update-motd.d/99-esm
+++ b/update-motd.d/80-esm
diff --git a/update-motd.d/99-livepatch b/update-motd.d/80-livepatch
index b900449..de59bf1 100755
--- a/update-motd.d/99-livepatch
+++ b/update-motd.d/80-livepatch
@@ -74,20 +74,20 @@ case "$livepatch_status" in
74 # do nothing74 # do nothing
75 ;;75 ;;
76 "enabled")76 "enabled")
77 echo
77 echo " * Canonical Livepatch is enabled."78 echo " * Canonical Livepatch is enabled."
78 print_status "${check_state}" "${patch_state}"79 print_status "${check_state}" "${patch_state}"
79 echo
80 ;;80 ;;
81 "disabled")81 "disabled")
82 echo
82 echo " * Canonical Livepatch is available for installation."83 echo " * Canonical Livepatch is available for installation."
83 echo " - Reduce system reboots and improve kernel security. Activate at:"84 echo " - Reduce system reboots and improve kernel security. Activate at:"
84 echo " https://ubuntu.com/livepatch"85 echo " https://ubuntu.com/livepatch"
85 echo
86 ;;86 ;;
87 *)87 *)
88 echo
88 echo " * Canonical Livepatch is in an unknown state."89 echo " * Canonical Livepatch is in an unknown state."
89 echo " - Please see /var/log/syslog for more information."90 echo " - Please see /var/log/syslog for more information."
90 echo " Status: \"$livepatch_status\""91 echo " Status: \"$livepatch_status\""
91 echo
92 ;;92 ;;
93esac93esac

Subscribers

People subscribed via source and target branches

to status/vote changes: