From owner-freebsd-current Wed Nov 22 13:22:54 2000 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 98CDF37B4CF; Wed, 22 Nov 2000 13:22:47 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id eAMLMda01472; Wed, 22 Nov 2000 22:22:39 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Dan Nelson Cc: current@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: RFC: /dev/console -> /var/log/messages idea/patch In-Reply-To: Your message of "Wed, 22 Nov 2000 15:12:22 CST." <20001122151221.A29341@dan.emsphone.com> Date: Wed, 22 Nov 2000 22:22:39 +0100 Message-ID: <1470.974928159@critter> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20001122151221.A29341@dan.emsphone.com>, Dan Nelson writes: >In the last episode (Nov 22), Poul-Henning Kamp said: >> The attached patch is a "proof-of-concept" on which I would like to >> get some comments: >> >> It bugs me big time that the output from /etc/rc and all other output >> to /dev/console is volatile and lost once it scrolls of your console. > >SCO logs its startup by simply piping the output of its rc scripts >through "2>&1 | tee -a /usr/adm/rc#.log". We could do something >similar by wrapping everything after the "mount -a -t nonfs" command on >like 174 with I've tried stuff like that and I didn't particularly like the result, for one thing many programs (or maybe it was tee(1) itself) changed buffering because of the pipe, which meant that the partial lines like "starting standard daemons: inetd cron sendmail sshd." would only arrive on the real console when the final \n arrived. Another particular thing I remember was that some syslog-challenged daemons whine on /dev/console long after /etc/rc has finished. Dump(8) will do something similar if you don't flip the tapes in finite time. So while it goes a long way, I think we need to provide more coverage of "/dev/console" as a concept. Poul-Henning PS: As I said, a decently functional console subsystem would be a nice thing. At the very least I would want to be able to specify: console output to /dev/ttyd0, /dev/ttyv0 and /var/log/console console input from /dev/ttyd0 or /dev/ttyv0. and preferably with a scrollback buffer too. Network consoles would be nice as well. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message