my lame attempt at a shell script...

Scott Bennett bennett at cs.niu.edu
Mon Jan 3 19:20:50 PST 2005


     On Mon, 3 Jan 2005 20:41:21 -0600 (CST) I wrote:
>     On Mon, 3 Jan 2005 16:22:45 -0500 Timothy Luoma <lists at tntluoma.com>
>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         *
**********************************************************************


More information about the freebsd-questions mailing list