Art Alexion on 2 Nov 2005 01:54:53 -0000 |
LeRoy Cressy wrote: > Stephen Gran wrote: > > >On Tue, Nov 01, 2005 at 06:11:09PM -0500, Art Alexion said: > > >>By default, my distro tries to run an ntp update script before it > >>initializes ppp. The documentation on the distro web site shows you how > >>to disable the ntp init script, but I don't want to do that. I want to > >>edit the startup so that it runs _after_ ppp is initialized. > >> > >>I installed the webmin init module, but need to read about the runlevel > >>and 'start at' and 'stop at' settings before I make any changes. Google > >>hasn't helped me find documentation. Can anyone recommend a place? > > > >Without knowing more about what your distro is, I invite you, > >semi-facetiously, to investigate the lovely command 'mv'. The beauty of > >a simple > >mv /etc/rc2.d/S23ntp /etc/rc2.d/S53ntp > >beats all of webmin, for me. > > >On a more serious note, if you know what your distros default run level > >is, just push the ntp start link to something slightly later than the > >ppp start link. That is the simplest solution. > > >The way it works, roughly (and totally solution dependant, but most > >linux distros do it this way these days) is that the kernel boots, and > >at some point hands thing off to init. init runs all of the scripts > >that start with S in the rcS.d directory, and then switches to the > >'default' run level - what that default is is completely distribution > >dependant, although I think Redhat-alikes all use 5. > > >Then init runs all scripts in rc5.d directory that begin with an S with > >the start argument (and really, it should also run all scripts that begin > >with a K with the stop argument, but many don't). The only real things > >to know about the hacked SysV init that most linux distros use is that > > >a) scripts whose names start with S should get run with the start > > argument > >b) scripts whose names start with K should get run with the stop > > argument > >c) All scripts in a directory are run in numerical order > >d) At boot, S is first, then default run level. > > >That's the basics for managing it. > > I have seen sever questions about linux startup in the past and I think > that it is a good time to answer some general questions. > > 1. Kernel loads init which reads /etc/inittab > 2. /etc/inittab references to the startup script with a lines > like: > > l0:0:wait:/etc/init.d/rc 0 > l1:1:wait:/etc/init.d/rc 1 > l2:2:wait:/etc/init.d/rc 2 > l3:3:wait:/etc/init.d/rc 3 > l4:4:wait:/etc/init.d/rc 4 > l5:5:wait:/etc/init.d/rc 5 > l6:6:wait:/etc/init.d/rc 6 > # Normally not reached, but fallthrough in case of emergency. > z6:6:respawn:/sbin/sulogin > > /etc/init.d/rc is a shell script which starts the startup > programs in order. Reading both inittab and the rc script > will teach you how the system starts. It is also good to > read the man page for init which gives the details of the > boot process. > > > Steve gave the quick info you wanted, but if you switch distros sometime > in the future, you will need to see where that distro puts the init > scripts. It seems that each distro is slitely different. I am understanding this better, but no closer to a solution. The thing that has me stumped (see my reply to Stephen Gran's help) is that the script I want to run later is in rcS.d which is supposed to execute for all run levels while the script I want to execute first is in rc2.d through rc5.d, which feels like it is making apples and oranges out of this ordering logic. In fact, ntpdate is S51 (that is /etc/rcS.d/S51ntpdate) while ifupdown is /etc/rcS.d/S39ifupdown, and ppp is /etc/rc[2-5].d/S14ppp. While I am getting a clearer understanding of what is _supposed_ to be going on, I am getting more confused with how _my system_ doesn't seem to want to follow the logic. -- _______________________________________ Art Alexion Arthur S. Alexion LLC PGP fingerprint: 52A4 B10C AA73 096F A661 92D2 3B65 8EAC ACC5 BA7A The attachment -- signature.asc -- is my electronic signature; no need for alarm. Info @ http://mysite.verizon.net/art.alexion/encryption/signature.asc.what.html Key for signed PDFs available at http://mysite.verizon.net/art.alexion/encryption/ArthurSAlexion.p7c The validation string is TTJY-ZILJ-BJJG. ________________________________________ Attachment:
signature.asc ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|