[PATCH] Fancy rc startup (revisited)

Giorgos Keramidas keramida at freebsd.org
Sun May 13 03:39:35 UTC 2007

On 2007-05-12 21:40, Dan Nelson <dnelson at allantgroup.com> wrote:
>In the last episode (May 12), Robert Watson said:
>> Call me old-fashioned, but I actually preferred the much more
>> abbreviated rc output from before rc.d even. :-) We're not going back
>> to hardware devices where all the probed devices add up to fewer than
>> 25 lines, I'm sure, but when daemons generated 8-12 characters
>> without a carriage return each, there was a good chance you could
>> still see the end of the kernel messages by the time you got to
>> login:, and I miss that.  I don't object to optional more complex
>> output as long as that complexity is hidden away neatly somewhere in
>> rc.subr, and isn't on by default as shipped.  I'd love it if someone
>> could restore the even shorter output we had before.
> Taken to an extreme, you have Solaris 10, where you get the kernel's
> copyright message, smf kicks off all the startup scripts in parallel
> (subject to dependency rules) in the background, their output goes
> into individual logfiles, and all you see is the login: prompt at the
> console :)

More like Solaris 10 "boot -v", where you still get the kernel messages,
but you have a point there.  I am kind of old-fashioned in the Robert
way too, however.  If there was a way to minimize the console output
when services are starting, i.e. to print something like:

  [last kernel message]

  Booting FreeBSD: dumpon initrandom fsck root hostid mountcritlocal
  var cleanvar random adjkerntz hostname kldxref swap sysctl netif (lo0
  fxp0) pflog pf routing devd nsswitch devfs syslogd ldconfig named
  auditd tmp cleartmp dmesg virecover local motd ntpd powerd syscons
  sshd sendmail cron securelevel power_profile inetd

  foo login:

where each rc.d script would only print its name if it *was* enabled
with xxx_enable, optionally followed by a parenthesized list of
single-word status messages for each subscript/component), would be
really neat.

Is there any easy way we can 'tune' the fancy script to support the
current output style, a very brief style like above, and then a fancy
colorful style, depending on an rc.conf setting?

- Giorgos

More information about the freebsd-current mailing list