[NTLUG:Discuss] sysV script help

Chris Cox cjcox at acm.org
Thu Sep 18 09:55:33 CDT 2003


m m wrote:
> Hi all:
> 
> is anyone can point me direction where are the sysV tutorial?
> 
> basically what I need is when a system starts, it will run this script 
> automatically
> 
> find current ip (i am using dhcp, it changes sometimes)
> change the new ip on all text files in a directory
> change text on the 3rd line on all files in a directory
> 

If you google for it, you'll come up with two primary sources
of info... Redhat's docs (ok, but reliant upon their chkconfig
tool.. which IS NOT standard sysV init... of course, if you
are using Redhat, then the doc may be just the thing for you),
the other source is Linux From Scratch, but it really doesn't
describe it very well.

I did find this note out of the Solaris Managers discussion
list, which I think does an adequate job.  However, please
note that Solaris does something absolutely EVIL in that
their runlevel 3 depends upon runlevel 2 (runlevel 2 scripts
get executed as a part of going into runlevel 3... ICK!!!).

http://www.sunmanagers.org/pipermail/summaries/2000-December/000086.html

Some of the commercial Linux implementations of SysV init are
clearly on steroids and do some very elegant things.  Both Redhat
and SuSE have a stock preamble comment format (both different however,
yet both can coexist) which allow their favorite admin utilities,
chkconfig on RedHat, and YaST RunLevel Editor on SuSE to automatically
detect new scripts and does the "linking" into the right directories
for you as directed by those utilities.  Of course, you won't
really learn SysV init doing it that way.... always good to understand
what is really going on... then when you're comfortable, you can
use the distribution admin utilities (I know that seems backwards,
but this the better approach for a future Sys Admin vs. a casual
user).







More information about the Discuss mailing list