[Bug 1855918] Re: show-motd: Show MOTD from /etc/profile.d snippet in the first shell every day
Balint Reczey
balint.reczey at canonical.com
Wed Dec 18 13:49:28 UTC 2019
Verified with 3.6-0ubuntu1.19.10.1 :
rbalint at yogi:~$ lxc shell ee-motd-verify
root at ee-motd-verify:~# unset MOTD_SHOWN
root at ee-motd-verify:~# touch -d 'now - 23 hours' $HOME/.motd_shown
root at ee-motd-verify:~# bash -i /etc/profile.d/update-motd.sh
Welcome to Ubuntu 19.10 (GNU/Linux 5.0.0-37-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Dec 18 13:48:23 UTC 2019
System load: 2.89 Processes: 29
Usage of /home: unknown Users logged in: 0
Memory usage: 0% IP address for eth0: 10.84.73.58
Swap usage: 100%
0 updates can be installed immediately.
0 of these updates are security updates.
This message is shown once once a day. To disable it please create the
/root/.hushlogin file.
root at ee-motd-verify:~# touch -d 'now - 25 hours' $HOME/.motd_shown
root at ee-motd-verify:~# bash -i /etc/profile.d/update-motd.sh
Welcome to Ubuntu 19.10 (GNU/Linux 5.0.0-37-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Dec 18 13:48:37 UTC 2019
System load: 2.83 Processes: 29
Usage of /home: unknown Users logged in: 0
Memory usage: 0% IP address for eth0: 10.84.73.58
Swap usage: 100%
0 updates can be installed immediately.
0 of these updates are security updates.
This message is shown once once a day. To disable it please create the
/root/.hushlogin file.
root at ee-motd-verify:~# touch -d 'now - 1 hour' $HOME/.motd_shown
root at ee-motd-verify:~# bash -i /etc/profile.d/update-motd.sh
root at ee-motd-verify:~# dpkg -l show-motd | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-====================-============-=============================================
ii show-motd 3.6-0ubuntu1.19.10.1 all show message of the day in interactive shells
** Description changed:
[Impact] (Compared to LP: #1855089)
- * Users are shown MOTD once a day but only in a shell started at a
+ * Users are shown MOTD once a day but only in a shell started at a
later hour than the one that showed MOTD the day before. This a bit
confusing and harder to predict than showing MOTD in the first started
shell every day. This fix implements the latter.
[Test Case]
- * MOTD should be shown when touch refers to a date yesterday:
+ * MOTD should be shown when touch refers to a date yesterday:
- $ install show-motd
- $ touch -d 'now - 23 hours' $HOME/.motd_shown
- $ . /etc/profile.d/update-motd.sh
+ $ install show-motd
+ $ unset MOTD_SHOWN
+ $ touch -d 'now - 23 hours' $HOME/.motd_shown
+ $ bash -i /etc/profile.d/update-motd.sh
...
- $ touch -d 'now - 25 hours' $HOME/.motd_shown
- $ . /etc/profile.d/update-motd.sh
+ $ touch -d 'now - 25 hours' $HOME/.motd_shown
+ $ bash -i /etc/profile.d/update-motd.sh
...
- $ touch -d 'now - 1 hour' $HOME/.motd_shown
- $ . /etc/profile.d/update-motd.sh
+ $ touch -d 'now - 1 hour' $HOME/.motd_shown
+ $ bash -i /etc/profile.d/update-motd.sh
...
-
[Regression Potential]
- * Since this is an improvement of the new functionality only available
+ * Since this is an improvement of the new functionality only available
in -proposed there is no extra regression potential compared to the
change introducing the new functionality in LP: #1855089.
** Tags removed: verification-needed verification-needed-eoan
** Tags added: verification-done verification-done-eoan
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-motd in Ubuntu.
https://bugs.launchpad.net/bugs/1855918
Title:
show-motd: Show MOTD from /etc/profile.d snippet in the first shell
every day
Status in update-motd package in Ubuntu:
Fix Released
Status in update-motd source package in Eoan:
Fix Committed
Bug description:
[Impact] (Compared to LP: #1855089)
* Users are shown MOTD once a day but only in a shell started at a
later hour than the one that showed MOTD the day before. This a bit
confusing and harder to predict than showing MOTD in the first started
shell every day. This fix implements the latter.
[Test Case]
* MOTD should be shown when touch refers to a date yesterday:
$ install show-motd
$ unset MOTD_SHOWN
$ touch -d 'now - 23 hours' $HOME/.motd_shown
$ bash -i /etc/profile.d/update-motd.sh
...
$ touch -d 'now - 25 hours' $HOME/.motd_shown
$ bash -i /etc/profile.d/update-motd.sh
...
$ touch -d 'now - 1 hour' $HOME/.motd_shown
$ bash -i /etc/profile.d/update-motd.sh
...
[Regression Potential]
* Since this is an improvement of the new functionality only
available in -proposed there is no extra regression potential compared
to the change introducing the new functionality in LP: #1855089.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-motd/+bug/1855918/+subscriptions
More information about the foundations-bugs
mailing list