From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 18 18:59:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B38816A401 for ; Tue, 18 Apr 2006 18:59:49 +0000 (UTC) (envelope-from gbergling@0xfce3.net) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F56143D46 for ; Tue, 18 Apr 2006 18:59:47 +0000 (GMT) (envelope-from gbergling@0xfce3.net) X-Envelope-From: gbergling@0xfce3.net Received: from central.0xfce3.net (dslb-088-072-033-140.pools.arcor-ip.net [88.72.33.140]) (authenticated bits=128) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id k3IIxNSn002510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 18 Apr 2006 20:59:23 +0200 Received: from central.0xfce3.net (localhost [127.0.0.1]) by central.0xfce3.net (8.13.6/8.13.4) with ESMTP id k3IIxEPL018630; Tue, 18 Apr 2006 20:59:14 +0200 (CEST) (envelope-from gbergling@0xfce3.net) Received: (from gordon@localhost) by central.0xfce3.net (8.13.6/8.13.4/Submit) id k3IIxCZa018629; Tue, 18 Apr 2006 20:59:12 +0200 (CEST) (envelope-from gbergling@0xfce3.net) X-Authentication-Warning: central.0xfce3.net: gordon set sender to gbergling@0xfce3.net using -f Date: Tue, 18 Apr 2006 20:59:11 +0200 From: Gordon Bergling To: Eric Anderson Message-ID: <20060418185911.GA18485@central.0xfce3.net> References: <444515C8.3030406@centtech.com> <20060418165709.GA17705@central.0xfce3.net> <44452532.40703@centtech.com> <20060418.114933.69380798.imp@bsdimp.com> <346a80220604181102v3597a1edp3e05fa663b87e15c@mail.gmail.com> <44453204.3030906@centtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44453204.3030906@centtech.com> X-Url: X-Operating-System: FreeBSD 6.1-RC i386 X-Host-Uptime: 8:44PM up 11:47, 0 users, load averages: 0.08, 0.05, 0.01 User-Agent: Mutt/1.5.11 X-Spam-Score: * (1.394) AWL,BAYES_50,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Cc: gbergling@0xfce3.net, freebsd-hackers@freebsd.org, cokane@cokane.org Subject: Re: [PATCH] Fancy rc startup style RFC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 18:59:49 -0000 * Thus spake Eric Anderson (anderson@centtech.com): > Coleman Kane wrote: > >On 4/18/06, *M. Warner Losh* > > >wrote: > > > > In message: <44452532.40703@centtech.com > > > > > Eric Anderson > > writes: > > : Gordon Bergling wrote: > > : > Hi, > > : > > > : > * Thus spake Eric Anderson (anderson@centtech.com > > ): > > : >> I've made a patch to /etc/rc.subr that makes the > > startup/shutdown rc > > : >> scripting look similar to other OS's (many different linux > > distros, > > : >> HP-UX, etc), but without color. > > : >> > > : >> The patch shouldn't break anything, and is only enabled if you > > have this > > : >> in your /etc/rc.conf: > > : >> > > : >> rc_fancy="YES" > > : >> > > : >> Several of the /etc/rc.d/* scripts send output to stdout, so > > that could > > : >> be cleaned up a bit if needed, but for now I tried to keep the > > patch as > > : >> minimal as possible. > > : >> > > : >> This is still a first pass, so please give feedback. > > : > > > : > A short try on my notebook shows some errors. > > : > I don't want to let this email getting too big, so I put the > > "dmesg -a" > > : > output online. http://generic.0xfce3.net/dmesg-fancy.txt > > : > > > : > BTW, the patch applied cleanly. > > : > > : > > : Thanks for the feedback! Looks like I made an erroneous > > assumption that > > : the wc, expr, and printf tools found in /usr/bin and /bin would be > > : available through boot, but that isn't the case on systems with those > > : file systems separate from /. I'm not sure how to resolve some of > > these > > : issues, since I don't know of a way to do those functions in csh > > without > > : them. I'm open to suggestions here from anyone. > > > > /bin and /sbin are available through the entire boot. Only things in > > /usr are suspect because /usr gets mounted early in the boot process, > > but not as early as /. > > > > Warner > > > > > >Nice work! > > > >I too noticed the dependence upon wc, printf, expr. I went ahead and > >rewrote these into equivalents in native sh. (attaching new diff). > > > >This diff is against the latest 7-CURRENT rc.subr. I had to manually > >merge 3 hunks due to some differences. > > Thanks!! I've put the updated version (for 6-STABLE) here: > > http://www.googlebit.com/freebsd/patches/rc_fancy.patch-2 > > > Gordon - can you give this version a try? Much better now. :) The [OK] Messages printed correctly. Some [failed] messages are missing a \t I think. But this should be the error of the respective scripts. Nice work so far... ;) best regards, Gordon -- Gordon Bergling http://www.0xFCE3.net/ PGP Fingerprint: 7732 9BB1 5013 AE8B E42C 28E0 93B9 D32B C76F 02A0 RIPE-HDL: MDTP-RIPE "Minimal Electronic Music"