From owner-freebsd-questions@FreeBSD.ORG Tue Jan 4 03:20:50 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CCDD16A4CE for ; Tue, 4 Jan 2005 03:20:50 +0000 (GMT) Received: from mp.cs.niu.edu (mp.cs.niu.edu [131.156.145.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id C11CC43D1F for ; Tue, 4 Jan 2005 03:20:49 +0000 (GMT) (envelope-from bennett@cs.niu.edu) Received: from mp.cs.niu.edu (bennett@localhost [127.0.0.1]) by mp.cs.niu.edu (8.13.2/8.13.2/d) with ESMTP id j043Kkqj017014; Mon, 3 Jan 2005 21:20:46 -0600 (CST) Date: Mon, 3 Jan 2005 21:20:45 -0600 (CST) From: Scott Bennett Message-Id: <200501040320.j043Kj1x017013@mp.cs.niu.edu> To: freebsd-questions@freebsd.org cc: lists@tntluoma.com Subject: Re: my lame attempt at a shell script... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 03:20:50 -0000 On Mon, 3 Jan 2005 20:41:21 -0600 (CST) I wrote: > On Mon, 3 Jan 2005 16:22:45 -0500 Timothy Luoma >wrote: > >>On Jan 3, 2005, at 3:49 PM, Eric F Crist wrote: >> >>> First off, let me thank you very much for the massive amount of >>> information you've given me thus far. >> >>I am a commandline geek from way back, so you're welcome. >> >>My brother actually had a Dilbert from years ago that he gave me where >>Dilbert runs into a guy with a long beard and suspenders and says "Hey, >>you're one of those Unix geeks, aren't you?" >> >>I wish I could get that on a T-Shirt! >> >>Anyway, the sourcing idea is definitely a good one. I'm not usually >>working with such easy source material (I do a lot of stuff where I'm >>pulling information off a website, etc) >> >>> Do me a favor and tell me if >>> this syntax is correct: >>> >>> #!/bin/sh >>> >>> . /etc/rc.conf >>> >>> if [ "$grog_firewall_enable" = "YES" ] >>> then >>> echo "Firewall enabled." >>> elif [ "$grog_firewall_enable" = "NO" ] >>> then >>> echo "Firewall disabled." >>> fi >>> >>> exit 0 >> >>yes, that's right >> > [remainder deleted --SB] > It has been many years, but it seems to me that, under 4.3BSD, the echo >commands shown above would have been verboten in /etc/rc or any scripts run >by it because none of those processes had a /dev/tty associated with them. Ah, how memory comes flooding back after the message has been sent! Sigh. /etc/rc did have a tty associated with its process and therefore could inform the operator that various daemons and subsystems had been started. It was only the subprocesses that were backgrounded that had to write any messages to a file or to /dev/null (or, possibly, to /dev/console). Mes excuses... Scott Bennett, Comm. ASMELG, CFIAG ********************************************************************** * Internet: bennett at cs.niu.edu * *--------------------------------------------------------------------* * "A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army." * * -- Gov. John Hancock, New York Journal, 28 January 1790 * **********************************************************************