Merge ~renanrodrigo/ubuntu/+source/update-notifier:file-based-motd-disable-xenial into ubuntu/+source/update-notifier:ubuntu/xenial-devel

Proposed by Renan Rodrigo
Status: Merged
Merged at revision: e3f732d8d23dacf61033587e9690b4a65f05f0b6
Proposed branch: ~renanrodrigo/ubuntu/+source/update-notifier:file-based-motd-disable-xenial
Merge into: ubuntu/+source/update-notifier:ubuntu/xenial-devel
Diff against target: 63 lines (+18/-17)
2 files modified
data/update-motd-updates-available (+12/-17)
debian/changelog (+6/-0)
Reviewer Review Type Date Requested Status
Nick Rosbrook Pending
Review via email: mp+461707@code.launchpad.net

Description of the change

update-motd: use a marker file to hide esm updates information

Instead of a flag passed to the script, check for the existence of a marker file coming from the Pro Client. This implements the same control level for both tools.

To post a comment you must log in.
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

This one a merge proposal against the git-ubuntu branch, as there is no `xenial` branch in the actual git repo.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/data/update-motd-updates-available b/data/update-motd-updates-available
2index 095dac5..7c5d92f 100755
3--- a/data/update-motd-updates-available
4+++ b/data/update-motd-updates-available
5@@ -2,25 +2,14 @@
6 #
7 # helper for update-motd
8
9-NEED_UPDATE_CHECK="no"
10 NO_ESM_MESSAGES=""
11
12-while [[ $# -gt 0 ]]; do
13- case $1 in
14- # poor mans force
15- --force)
16- NEED_UPDATE_CHECK="yes"
17- shift
18- ;;
19- --no-esm-messages)
20- NO_ESM_MESSAGES="--no-esm-messages"
21- shift
22- ;;
23- *)
24- shift
25- ;;
26- esac
27-done
28+# poor mans force
29+if [ "$1" = "--force" ]; then
30+ NEED_UPDATE_CHECK=yes
31+else
32+ NEED_UPDATE_CHECK=no
33+fi
34
35 # check time when we did the last update check
36 stamp="/var/lib/update-notifier/updates-available"
37@@ -59,6 +48,12 @@ tmpfile=""
38 trap cleanup EXIT
39 tmpfile=$(mktemp -p $(dirname "$stamp"))
40
41+# should we hide esm-related information in the output
42+no_esm_file="/var/lib/update-notifier/hide-esm-in-motd"
43+if [ -e "$no_esm_file" ]; then
44+ NO_ESM_MESSAGES="--no-esm-messages"
45+fi
46+
47 # output something for update-motd
48 if [ "$NEED_UPDATE_CHECK" = "yes" ]; then
49 {
50diff --git a/debian/changelog b/debian/changelog
51index 2494654..d61299e 100644
52--- a/debian/changelog
53+++ b/debian/changelog
54@@ -1,3 +1,9 @@
55+update-notifier (3.168.22) xenial; urgency=medium
56+
57+ * update-motd: use a marker file to hide ESM messages (LP: #2015420)
58+
59+ -- Renan Rodrigo Barbosa <renanrodrigo@canonical.com> Mon, 04 Mar 2024 08:17:07 -0300
60+
61 update-notifier (3.168.21) xenial; urgency=medium
62
63 * apt-check: add option to hide ESM messages from the human readable output.

Subscribers

People subscribed via source and target branches