From owner-freebsd-questions@FreeBSD.ORG Tue Jan 4 02:41:24 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 7A01716A4CE for ; Tue, 4 Jan 2005 02:41:24 +0000 (GMT) Received: from mp.cs.niu.edu (mp.cs.niu.edu [131.156.68.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DC5343D1F for ; Tue, 4 Jan 2005 02:41:24 +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 j042fL7k014500; Mon, 3 Jan 2005 20:41:21 -0600 (CST) Date: Mon, 3 Jan 2005 20:41:21 -0600 (CST) From: Scott Bennett Message-Id: <200501040241.j042fLo0014499@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 02:41:24 -0000 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. Has this limitation been bypassed in FreeBSD somehow? 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 * **********************************************************************