From owner-freebsd-current@FreeBSD.ORG Fri May 25 04:14:56 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0571016A41F; Fri, 25 May 2007 04:14:56 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh2.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id C603213C45D; Fri, 25 May 2007 04:14:55 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from neutrino.centtech.com ([192.168.42.25]) by mh2.centtech.com (8.13.8/8.13.8) with ESMTP id l4P4EkYv093228; Thu, 24 May 2007 23:14:46 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <465662B6.6090409@freebsd.org> Date: Thu, 24 May 2007 23:14:46 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.0 (X11/20070521) MIME-Version: 1.0 To: Giorgos Keramidas References: <464464BB.3090100@freebsd.org> <20070511152646.g6n5r7k2tcw00ow4@webmail.leidinger.net> <464476D3.3090001@freebsd.org> <4645173A.2040008@freebsd.org> <20070512205110.U24765@fledge.watson.org> <20070513024030.GE2364@dan.emsphone.com> <20070513031807.GA6437@kobe.laptop> <46476700.6010101@freebsd.org> <20070513201402.GB22152@kobe.laptop> In-Reply-To: <20070513201402.GB22152@kobe.laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/3297/Thu May 24 21:29:55 2007 on mh2.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh2.centtech.com Cc: Robert Watson , Kian Mohageri , Dan Nelson , freebsd-current@freebsd.org Subject: Re: [PATCH] Fancy rc startup (revisited) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 04:14:56 -0000 On 05/13/07 15:14, Giorgos Keramidas wrote: > On 2007-05-13 14:29, Eric Anderson wrote: >> On 05/12/07 22:18, Giorgos Keramidas wrote: >>> 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? >> I think the rc_fancy patch could be pretty easily tweaked to do exactly >> what you say. > > Yeah, that was my impression from skimming through the changes :) I was wrong. To do it right, I think we'd need to capture all output from rc scripts, and output them in a unified way. I'm thinking of replacing all 'echo' statements that output text to STDOUT, with a function like rc_echo, which does different things depending on the settings of an rc.conf set of variables. Then, you'd have a main rc.conf knob, called rc_output_style, with settings like OFF/NO/NONE, QUIET, SHORT, FANCY, and a rc_output_color YES/NO toggle, so any one of those could be colorful or not. The default would be as it looks without any of this, but the options would be the 'FANCY' style, like my patch does now with the fancy [ OK ] type messages, SHORT style would output similar to above, QUIET would output nothing. NONE/OFF/NO/etc would all just print output as it currently is. Comments? >> I might give it a go, and add that as another option to it. Maybe >> then the variable should change to rc_style_* instead? > > Can I help with testing or even writing the necessary changes? Sure! Let's get it ironed out first, then we'll write it.. Thanks, Eric