[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: motd handling in jessie



On Fri, Jan 23, 2015 at 11:56:33AM -0800, Josh Triplett wrote:
> Michael Biebl wrote:
> > I'm also no longer convinced, that running a huge shell machinery (as
> > root) during login via PAM is a good idea.
> 
> Agreed.
> 
> > If we go the update-motd route, I'd like to see the update-motd calls be
> > removed from login (and boot) and instead have the dynamic part of
> > /etc/motd be updated via a cron job.
> 
> Please, no.  Under normal circumstances, the only dynamic bit of the
> motd comes from uname, and only changes on reboot; updating it via cron
> just wastes cycles and adds noise to syslog.
Modern agetty allows escapes in /etc/issue (see section ISSUE ESCAPES
in agetty(8)) to insert values directly from uname(2) and /usr/lib/os-release.
It should be plenty enough for the common case of displaying
the distribution name and kernel version. Something like

  \S{PRETTY_NAME}
  Kernel \r on an \m (\l)

is informative and does not require updates, even if more dynamic things like
IP addresses and such are included. This does not solve the problem for SSH,
but it is a much nicer approach imho.

> I'm not particularly convinced that even the existing uname line has
> much value.  So what about this: why don't we move all of that machinery
> to an update-motd package or similar (priority optional), which can hook
> into PAM as desired to display its message, and have the default motd of
> the base system be completely static, with nothing run at boot *or*
> login?

Zbyszek


Reply to: