Stephen Gran on 2 Nov 2005 14:40:23 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Editing System V init


On Wed, Nov 02, 2005 at 08:36:10AM -0500, Art Alexion said:
> 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.
> 
> >So, the simple answer is 
> >mv /etc/rcS.d/S51ntpdate /etc/rc2.d/S51ntpdate
> >  
> From what I have gathered so far, the rcS.d commands run in _every_
> runlevel. Do I need to put it in rc[3-5].d also?

Yes, that certainly doesn't hurt.  rcS is run not for every level, but
once at boot.  So, if after booting into run level 3, you then change to
run level 5, scripts in rcS are not rerun - only the kill scripts in rc3
and the start scripts in rc5.

> >The more complicated answer is to run ppp from ifupdown, so it starts
> >earlier in the boot process.  
>
> Which brings up another question.  With DOS, I could debug autoexec.bat
> by commenting "echo off".  That way I could see which lines had
> problems.  Is there a way to do that with init so that I can see exactly
> which command is starting PPP?  It seems like ifupdown _is_ starting PPPoE.

I think /etc/default/bootlogd should have a BOOTLOG_ENABLE or something,
to at least log boot up events beyond the kernel and init messages -
this will help recreate what the scripts are doing.  Another way would
be to add echo statements to the init scripts you care about.

I doubt ifupdown is starting ppp, from your description, or at least not
doing it well, since you have no network when ntpdate runs.  That
implies to me the network is only brought up later by the ppp init
script.  There is, though, a known problem with starting ppp from init
scripts - the pppd command returns control to the calling process after
daemonizing, but before networking is actually brought up - this makes
it difficult for init scripts to decide to move on or not.  Most people
have so far just ignored this problem, but it does make things like this
trickier to debug.
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | You may be marching to the beat of a    |
|  steve@lobefin.net             | different drummer, but you're still in  |
|  http://www.lobefin.net/~steve | the parade.                             |
 --------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
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