Shell scripting question
    Charles Swiger 
    cswiger at mac.com
       
    Fri Mar 24 17:30:41 UTC 2006
    
    
  
On Mar 24, 2006, at 12:12 PM, Paul Schmehl wrote:
> Neither rc.conf nor source_rc_confs appears anywhere else in the  
> script, so how does this suck in the variables?  And what does the  
> syntax ". /etc/rc.conf" do?
Your second question is the answer to your first question:
    . /etc/rc.conf
...or "source _file_", means to read the file into the current shell  
and execute those commands.  It's used to load the variables set in / 
etc/rc.conf.
> Here's what I understand so far.  If the variable  
> source_rc_confs_defined is a zero length string, then if /etc/ 
> defaults/rc.conf is readable, then do something with it.  I have no  
> idea what the next line "source_rc_confs" does.  Else, if /etc/ 
> rc.conf is readable, then do something with that.
Yes.  Take a look at the end of /etc/defaults/rc.conf and /etc/ 
rc.subr...
-- 
-Chuck
    
    
More information about the freebsd-questions
mailing list