Re: Shell scripting question



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

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: function definition syntax
    ... :> In which case it might as well be a separate script - you don't need a function. ... :>: That's much more reliable than having to remember which syntax ... Always using POSIX ... :> not overlook restoring IFS. ...
    (comp.unix.shell)
  • Re: Books/References new to scripting in AD/2003
    ... my own website has lots of script samples you might find useful: ... test bits of flag attributes like userAccountControl using SQL syntax. ... To restrict the query to an OU, ...
    (microsoft.public.windows.server.scripting)
  • Re: Books/References new to scripting in AD/2003
    ... Good luck with your scripting - It's a worthwhile pursuit and the time you spend learning to script can easily be re-paid. ... I don't believe there is any way to test bits of flag attributes like userAccountControl using SQL syntax. ... but needs to be enclosed in quotes in a query. ...
    (microsoft.public.windows.server.scripting)
  • Re: Legacy code/browser compatibility
    ... a user of such an ancient browsers may see a syntax error ... either script supported or not. ... browsers, script will be supported. ... that doesn't support object literals ...
    (comp.lang.javascript)
  • Re: Books/References new to scripting in AD/2003
    ... bits of flag attributes like userAccountControl using SQL syntax. ... To restrict the query to an OU, ... The equivalent LDAP syntax query would be: ... Here is the part of the script where it is pulling the info from AD. ...
    (microsoft.public.windows.server.scripting)