From 0af73907c16fe0d750f2ccf9b2669539d9738ef2 Mon Sep 17 00:00:00 2001 From: dougb Date: Tue, 29 Sep 2009 18:44:34 +0000 Subject: [PATCH] MFC r197297 Add a knob to show 'Starting foo:' messages when faststart is used, such as at boot time. MFC 197619 By popular acclaim, enable "Starting foo:" messages by default Approved by: re (bz) git-svn-id: svn://svn.freebsd.org/base/stable/8@197620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- etc/defaults/rc.conf | 1 + etc/rc.subr | 8 +++++++- share/man/man5/rc.conf.5 | 9 ++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 72c120927..d64a647a4 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -23,6 +23,7 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. +rc_startmsgs="YES" # Show "Starting foo:" messages at boot rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown early_late_divider="FILESYSTEMS" # Script that separates early/late # stages of the boot process. Make sure you know diff --git a/etc/rc.subr b/etc/rc.subr index f8e211a4a..86e8c7d8f 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -680,7 +680,13 @@ run_rc_command() # setup the full command to run # - [ -z "${rc_quiet}" ] && echo "Starting ${name}." + _show_startmsgs=1 + if [ -n "${rc_quiet}" ]; then + if ! checkyesno rc_startmsgs; then + unset _show_startmsgs + fi + fi + [ -n "$_show_startmsgs" ] && echo "Starting ${name}." if [ -n "$_chroot" ]; then _doit="\ ${_nice:+nice -n $_nice }\ diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 3075a4e70..5e7e8c8c7 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd September 17, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -95,6 +95,13 @@ disable informational messages from the rc scripts. Informational messages are displayed when a condition that is not serious enough to warrant a warning or an error occurs. +.It Va rc_startmsgs +.Pq Vt bool +If set to +.Dq Li YES , +show +.Dq Starting foo: +when faststart is used (e.g., at boot time). .It Va early_late_divider .Pq Vt str The name of the script that should be used as the -- 2.45.0