View Single Post

   
  #5 (permalink)  
Old 02-19-2008, 09:25 PM
Joost Kremers
 
Posts: n/a
Default Re: rc.inet1.conf mod is 644

David wrote:
> I notice that in my rc.d directory, besides 'rc.inet1.conf',
> 'rc.netdevice' and 'rc.serial' also don't begin with the '#!/bin/sh', so
> I assume they could be chmod to 644 without effecting my system?


not necessarily: check the rc files from which they are read (just do a
'grep rc.netdevice' in /etc/rc.d/). the rc scripts that actually get
executed (rc.S, rc.M; check /etc/inittab) are the ones that source the
other scripts. for most of these, they check whether they are executable
and only if they are do they actually source them. that setup makes it easy
to enable or disable certain rc scripts: just chmod +/-x them and you're
done.

compare this to the way the .conf files are sourced: they are sourced
without the sourcing script checking if they're executable.

> And then when the config files are sourced, as in the case of
> 'rc.inet1.conf' because it hasn't any commands, it's setting environment
> variables?


well, they set up variables which are then used in the script that reads
the .conf file. i wouldn't call them environtment variables, because they
are lost as soon as the sourcing script exits. they are not retained in the
environment of any user.

--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
Reply With Quote