[NTLUG:Discuss] sysV script help

m m llliiilll at hotmail.com
Thu Sep 25 13:38:50 CDT 2003


Chris:

Thanks for the information. I think I want to know the information about 
write the script.
or some one give me a piece of example code?

the code I need can do:

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

thanks in advance.

>From: Chris Cox <cjcox at acm.org>
>Reply-To: NTLUG Discussion List <discuss at ntlug.org>
>To: NTLUG Discussion List <discuss at ntlug.org>
>Subject: Re: [NTLUG:Discuss] sysV script help
>Date: Thu, 18 Sep 2003 09:55:33 -0500
>
>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).
>
>
>
>
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail




More information about the Discuss mailing list