At 21:18 25.08.2003, Francois BERGERET wrote:
Hi Erich and Dave (and the list).
I have just checked, to learn more, the solution given by our friend Dave, to delay DHCPD starting.
It is ok for now, thank you very much Dave ! :-)
But, I want to understand how this instruction works.
I have read all the other scripts included in /etc/init.d/ and I have noticed that the number of 'S' arguments and their indice are
not the same for each of them.
Any pointer or short "mini howto" to explain this, please ?
If you want to understand how _exactly_ the RCDLINKS variable works, I guess you will have to read /usr/sbin/update-rc.d.
Here is what I understand following the RCDLINJKS variable in assert
RCDLINKS="2,S15 3,S15"
this creates links to assert as
/etc/rc2.d/S15assert and /etc/rc3.d/S15assert
e.g. these scripts are executed at run level 2 and 3 according to their lexicographic position in that directory. A directory listing of rc2.d reveals
<stripped for legibility> K41shorewall -> ../init.d/shorewall S00sysklogd -> ../init.d/sysklogd S10watchdog -> ../init.d/watchdog S13pcmcia -> ../init.d/pcmcia S15assert -> ../init.d/assert S15rload -> ../init.d/rload S20inetd -> ../init.d/inetd S40dhclient -> ../init.d/dhclient S41shorewall -> ../init.d/shorewall S42ipsec -> ../init.d/ipsec S50sshd -> ../init.d/sshd S60ez-ipupd -> ../init.d/ez-ipupd S89cron -> ../init.d/cron S99checkpass -> ../init.d/checkpass S99rmnologin -> ../init.d/rmnologin </stripped for legibility>
and is the sequence these scripts are executed at run level 2.
If there are any n,Kmm parameters, these create links to /etc/rcn.d/Kmm..... files.
AFAIK this is just DEBIANESE
......
Questions :
1/ Erich, please, must I add your assert just at beginning of the normal /etc/init.d/dhcpd script ?
If I want to check 'eth' and 'wlan' NICs without counting them, must I only modify, as you said : WHAT="-e eth -e wlan"
I am not running dhcpd on the firewall but I believe it is running at position 30 at run level 2, so well past assert...
2/ How to start to learn how to write this kind of script ? Is there some HOWTO somewhere with a lot of exemples ?
I guess O'Reilly must have some kind of a book on shell scripting. There is some esoteric shell scripting in the LEAF distribution. I personally like the shorewall scripts as a good example, well documented and just the right terseness, but there are many other good examples and if you really want to dig in go for Dave's scripts....
There is always 'man sh' on most *X distributions (well not on a stripped down distro like LEAF :-) )
cheers Erich
THINK P�ntenstrasse 39 8143 Stallikon mailto:[EMAIL PROTECTED] PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
