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

Re: motd handling in jessie



* Josh Triplett <josh@joshtriplett.org> [150126 11:24]:
> Russ Allbery wrote:
> > Josh Triplett <josh@joshtriplett.org> writes:
> > > However, I don't think "run a pile of scripts to write out a dynamic
> > > MOTD at boot time" is a sensible default, either.
> > 
> > Why not?
> > 
> > > I'd suggest putting update-motd and update-motd.d into a separate,
> > > optional package that users can install if they really want it, and
> > > using either static files or /etc/issue escape sequences as the default
> > > to avoid running *anything* at either boot or login time.
> > 
> > This desire to avoid running something at boot is mystifying to me.  Since
> > when do we try to avoid running things at boot, and why would we?  It's
> > not like this is going to add any appreciable delay to boot time (and
> > that's not a huge concern anyway).
> 
> One more (set of) shell scripts spawned at boot time adds incremental
> complexity, fragility, and yes, a small amount of delay.  It might not
> matter much if you're spending 60 seconds booting a server; on the other
> hand, with client boot times currently at a few seconds without any
> optimization, <1s with a little work, and hopefully heading even lower,
> spawning off even one more instance of /bin/sh than needed (along with
> miscellaneous other programs invoked from a shell script) seems worth
> avoiding.

If we are going to include uname in the motd, /etc/motd must be built
after boot, before the first login.  Cron is not a viable option for
this, and it seems to be agreed that pam is the wrong place to do this,
as well.

If we are talking about the Debian default behavior, I think the "pile
of scripts" being referred to is a single script that will probably be
as simple as { uname -a ; cat /etc/motd.skel } > /etc/motd.  I think one
shell script invoking two executables is an acceptable price to get
uname in motd.

If we are not talking about the Debian default, then the size of the
"pile of scripts" is at the discretion of the local sysadmin.

I think you are over-estimating the burden that this will put on the
boot process.  Your boot times of "<1s with a little work" could easily
include removing the update-motd scripts, and I think Russ' proposed
solution will still give you your "few seconds without any
optimization".

...Marvin


Reply to: