From: miquels@htsa.aha.nl (Miquel van Smoorenburg)
Subject: Re: Problems with sysv init sources
Date: Wed, 16 Dec 1992 17:52:38 GMT
Organization: Algemene Hogeschool Amsterdam, Polytechnic Institute
Keywords: init

In article <1992Dec15.134909.28520@mintaka.lcs.mit.edu> wyvern@gnu.ai.mit.edu (The Wyvern) writes:
>I recently compiled and installed the sources for the sysv-style init
>from tsx-11 (plus the patch). It seems to be having problems
>with runlevels though. If I have initdefault set to, say, 3,
>and a couple lines like this:
>
>rc:3:wait:/etc/rc3
>xd:3:once:/usr/X386/bin/xdm
>
>Init gives me something like:
>INIT: Warning: No processes for this runlevel
>INIT: Entering single user mode
>/ root# 
>So I end up having to have all the entries in my inittab be either
>boot or bootwait, since those are the only ones which get executed.
>Right now my inittab looks like this:
>
>id:3:initdefault: 
>si::sysinit:/etc/bcheckrc 
>rc::bootwait:/etc/rc 
>r3::bootwait:/etc/rc3 
>xd::boot:/usr/X386/bin/xdm
>#c1:1234:respawn:/etc/getty 9600 tty1
>#c2:23:respawn:/etc/getty 9600 tty2
>#c3:23:respawn:/etc/getty 9600 tty3
>#c4:23:respawn:/etc/getty 9600 tty4
>pf::powerwait:/etc/shutdown -f now
># init
>
>This is highly annoying - it kind of defeats the purpose of an init
>with runlevels. Does anyone have an idea of what might be wrong?
>
>(Incidentally, for those of you who are having trouble with xdm
> you might try starting it from your inittab rather than your rc or
> rc.local - for me it only works correctly when put in the inittab
> as shown above.)
>
Yes, I have heard of this problem. I even got a patch for it.
Here is a message I got concerning this problem:
--------------------------------------------------------------

From: "Roger T Lashua-1" <lash0002@student.tc.umn.edu>
Subject: init
To: miquels@htsa.aha.nl
Date: Mon, 14 Dec 92 4:22:19 CST

Hi,

I have been using your system-V init for some time now.
I have recently gotten the 2.0 version. I am very happy to see that
you have made changes that i have been comsidering doing myself (such
as using a linked list). There are two things that appear not to work
properly in version 2.0, though I may be expecting them to function
differently than they were intended to. The first is: if i boot up and
the initdefault entry is 2 (tho anything other than s will do it)
entries for level 2 with an action field of wait or once will not be
executed. I have changed it so that they will be executed by changing
the line in StartEmIfNeeded() that was:
	lastlevel = runlevel
to
	if (sys_level == NORMAL_LEVEL) lastlevel = runlevel

Is that a good way to make it execute the entries or do you see other
problems?

The second thing is that if initdefault is something other than a
legitamete level (0123456Sabc) it acts as though the level is fine but
no processes are defined, and goes single-user. I am not sure what
should happen but on some other systems i have used it will prompt for
a runlevel. I think that would be preferable. Anyway, it is easy
enough to change the behaviour in getinitdefault().

Thanks for making a great init available for linux.


	tim
-------------------------------------------------------------------
I still have to look into this myself, but I posted this anyway
hoping to solve your problem. I'll wait a week or so and if I don't
get any more bug reports I'll try to distribute a 2.1 version that
will hopefully bugfree. You may have noticed that shutdown
and last also have a little bug [though not serious].

Hope this helps - Mike.




-- 
%     Miquel van Smoorenburg, Baljuwstraat 20, 2461SL Langeraar, Holland.     %
%   miquels@htsa.aha.nl (school)       miquels@drinkel.nl.mugnet.org (home)   %
%                   Calm down - it's just ones and zeros                      %