[systemd-devel] Unit file for motd (message of the day) (was: Trying systemd with Debian Sid/unstable on ASRock E350M1 with Crucial m4 SSD)

Lennart Poettering lennart at poettering.net
Tue Jun 19 11:04:45 PDT 2012


On Sun, 10.06.12 14:40, Paul Menzel (paulepanter at users.sourceforge.net) wrote:

heya,

>           [ Roger Leigh ]
>           * initscripts:
>             - Don't generate or touch /etc/motd.  Instead, the dynamic part of
>               /etc/motd is created as /run/motd.dynamic, leaving /etc/motd
>               entirely under the control of the system administrator.  If
>               /etc/motd is a symlink to /run/motd, /etc/motd.tail is moved
>               back to /etc/motd.  Closes: #353229, #624391, #668307.  /etc/motd
>               is not removed if initscripts is purged, since it's not owned by
>               initscripts.
>             - By default, /run/motd is just the output of uname, preserving the
>               existing behaviour.  However, should the administrator wish to
>               include dynamic information in the motd, they may write scripts
>               to update /run/motd.dynamic as they please.  Closes: #437176.

Yikes, baroque.

> So is systemd’s conversion of that init.d script to a unit file take so
> long? Can someone point me to a unit/service file for motd so that I can
> compare it? Unfortunately I could not find one on the net when searching
> for »fedora systemd motd service file«.

Honestly I always found that this mangling of motd in Debian is
quite confused. /etc should be considered read-only. Always writing
to the root fs just because you boot the machine is a really bad idea.

if the Debian folks really want to show the uname next to motd, then
they should stop mucking with /etc/motd and instead hack pam_motd to
simply optionally show the uname next to /etc/motd. That way it is
guaranteed to be fully up-to-date, doesn't result in writing IO, is
compatible with read-only root, and generally more robust and elegant.

Getting rid of this shell script would probably mean adding about 5
lines of code to pam_motd, a super trivial patch.

So, to make this very clear: we have no interest in the feature to be
available in systemd, and we dislike the implementation of it very
much. If Debian wants to keep this feature around it really should get
it implemented at the right place, and that is most likely pam_motd.

Hope this makes sense,

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list