[Pkg-sysvinit-devel] Bug#437176: Please provide an 'update-motd' script instead of handling motd updates in the initscript
Javier Fernández-Sanguino Peña
jfs at computer.org
Fri Aug 10 21:22:56 UTC 2007
Package: initscripts
Version: 2.86.ds1-7
Tags: wishlist
Right now users wishing to edit motd just have two options:
- Do not point /etc/motd to /var/run/motd and instead point to a static file,
and edit that file
Advantage: Inmediate visibility
Disadvantage: Motd cannot be updated with dynamic info
- Edit /etc/motd.tail
Advantage: Preserve dynamic info
Disadvantage: Will only be seen after a system reboot
Motd(1) does not describe this (will issue a different bug) but IMHO we
should have an 'update-motd' script to update motd, even if it just did the
following (from bootmisc.sh's script):
# Update motd
uname -snrvm > /var/run/motd
[ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
And the 'update-motd' script should be run by bootmisc.sh.
That way admin's could update the motd by editing /etc/motd.tail and just
running 'update-motd' and could have a system that had a) Inmediate
visibility and b) Preserve dynamic info
Notice also that the script could
a) check if /etc/motd exists and recreate it if it didn't
b) warn (if /etc/motd exists but does not point to /var/run/motd), that
the contents will not be shown to the user.
c) warn (if the user still has the EDITMOTD=no from older releases), that
this variable is obsolete
So it could actually be a little bit more than a 2-line script :)
If the initscripts' maintainers are willing to go this way I can provide a
working patch for this.
Regards
Javier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20070810/3a8243e6/attachment.pgp
More information about the Pkg-sysvinit-devel
mailing list