[comp.unix.wizards] Init S on System V 3.2

wizm@mbf.UUCP (Marc Wiz) (06/02/90)

I and another engineer here are  in  need  of  some  net  wisdom.
Here's the problem:

on system V 3.2 performing an init S puts the system into  single
user  mode.   It also makes the terminal that executed the init S
the system console.  Also according to the man page init(1M), all
mounted  file systems are left mounted and only processes spawned
by init are killed. What the man page and documentation does  not
say  is  that  any  processes  i.e. daemons that were created via
script files in /etc/rc* are still running.  Which means that  if
you  perform  an  init  2  from this state then there will be two
copies of every daemon running.  Obviously this is not a  desire-
able state! :-)

The easy thing to do is just perform an init 6 which will  reboot
the  system.   In  the interests of getting the system back up to
multi-user mode in the shortest time, the ideal would be the init
2.    What can we do to go back to run state 2 without rebooting?
And is this a bug or a feature?

Thanks in advance for the help. Marc

-- 
:                                                    Marc Wiz                :
:      Yes, that really is my last name.             MAI Basic Four, Inc.    :
:                                                    Tustin, CA  92680       :
:  UUCP:sun!sequent!mbf!wizm                        Ma Bell:1-714-730-2602   :
:       uunet!ccicpg!mbf!wizm                                                :

jhpb@granjon.UUCP (Joseph H. Buehler) (06/05/90)

In article <22129@mbf.UUCP> wizm@mbf.UUCP writes:

   I and another engineer here are  in  need  of  some  net  wisdom.
   Here's the problem:

   on system V 3.2 performing an init S puts the system into  single
   user  mode.   It also makes the terminal that executed the init S
   the system console.  Also according to the man page init(1M), all
   mounted  file systems are left mounted and only processes spawned
   by init are killed. What the man page and documentation does  not
   say  is  that  any  processes  i.e. daemons that were created via
   script files in /etc/rc* are still running.  Which means that  if
   you  perform  an  init  2  from this state then there will be two
   copies of every daemon running.  Obviously this is not a  desire-
   able state! :-)

   The easy thing to do is just perform an init 6 which will  reboot
   the  system.   In  the interests of getting the system back up to
   multi-user mode in the shortest time, the ideal would be the init
   2.    What can we do to go back to run state 2 without rebooting?
   And is this a bug or a feature?

   Thanks in advance for the help. Marc

Seems like there should be some scripts in /etc/rc2.d to kill the
daemons.  You might also want to read up on /etc/inittab, in section 4
of the manual.

Joe Buehler
--
Joe Buehler

sar0@cbnewsl.att.com (stephen.a.rago) (06/08/90)

In article <22129@mbf.UUCP>, wizm@mbf.UUCP (Marc Wiz) writes:
> 
> I and another engineer here are  in  need  of  some  net  wisdom.
> Here's the problem:
> 
> on system V 3.2 performing an init S puts the system into  single
> user  mode.   It also makes the terminal that executed the init S
> the system console.  Also according to the man page init(1M), all
> mounted  file systems are left mounted and only processes spawned
> by init are killed. What the man page and documentation does  not
> say  is  that  any  processes  i.e. daemons that were created via
> script files in /etc/rc* are still running.  Which means that  if
> you  perform  an  init  2  from this state then there will be two
> copies of every daemon running.  Obviously this is not a  desire-
> able state! :-)
> 
> The easy thing to do is just perform an init 6 which will  reboot
> the  system.   In  the interests of getting the system back up to
> multi-user mode in the shortest time, the ideal would be the init
> 2.    What can we do to go back to run state 2 without rebooting?
> And is this a bug or a feature?

Use init 0, instead of init s, but you'll have to remount the file
systems if you need access to them.  Init state 0 will kill the
processes.  However, I would not advise typing "init x" on anything
other than the system console.  Most software sends diagnostics to
/dev/console, not /dev/syscon.  Also, the kernel can only printf to
the system console.  So if you're using something other than
/dev/console as the system console, you can miss important messages.

Steve Rago
sar@attunix.att.com

sar0@cbnewsl.att.com (stephen.a.rago) (06/08/90)

In article <1990Jun8.025421.25366@cbnewsl.att.com>, sar0@cbnewsl.att.com (stephen.a.rago) writes:
> 
> Use init 0, instead of init s, but you'll have to remount the file
> systems if you need access to them.  Init state 0 will kill the

I'm sorry, I meant init 1, not init 0.  Init state 0 powers the
machine off (if it's a 3b2).  Init state 1 is what you want.

Steve Rago
sar@attunix.att.com

det@hawkmoon.MN.ORG (Derek E. Terveer) (06/11/90)

In article <1990Jun8.025421.25366@cbnewsl.att.com> sar0@cbnewsl.att.com (stephen.a.rago) writes:
> Use init 0, instead of init s, but you'll have to remount the file
> systems if you need access to them.  Init state 0 will kill the
> processes.  [..]

Hmmm, don't you mean "init 1" here?  "init 0" on most systems (but not all!)
i've seen (but all of the V3.2 systems 'fur sure) will bring the system to a
halt.  This is supposed to be the "about to be powered down state".  Init 1
will do the same as init s except kill superfluous processes and unmount excess
file systems.

derek
-- 
Derek Terveer		det@hawkmoon.MN.ORG

brando@uicsl.csl.uiuc.edu (06/13/90)

An additional note:

You must use init 3 to startup all of the networking software, too. Out of the
box, most of the SYSV boxes I've installed come with initdefault in 
/etc/inittab set to 2. This includes the 386 Unix machines.  I would think 
that the installation scripts for TCP/IP and NFS would modify the default 
init state, but they do not.

Brando

chad@anasaz.UUCP (Chad R. Larson) (06/15/90)

In article <1990Jun11.064652.2434@hawkmoon.MN.ORG> det@hawkmoon.MN.ORG
 (Derek E. Terveer) writes:
+---------------
| Hmmm, don't you mean "init 1" here?  "init 0" on most systems (but not
| all!) i've seen (but all of the V3.2 systems 'fur sure) will bring the
| system to a halt.  This is supposed to be the "about to be powered down
| state".  Init 1 will do the same as init s except kill superfluous
| processes and unmount excess file systems.
+---------------
Unless, of course, you're on an NCR Tower running their distribution of
SysVr3.  Then run state 1 is multi-user mode!  Doncha just love the way
people REALLY BELIEVE in standards?  I've got about a half dozen Unix
machines to administer, and I just love it when my fingers (running
ahead of my brain) type something like "telinit 2" when it should have
been "telinit 1" (but only on this one machine....)
	-crl

derek
-- 
Derek Terveer		det@hawkmoon.MN.ORG


-- 
Chad R. Larson          ...{mcdphx,asuvax}!anasaz!chad or chad@anasaz.UUCP
Anasazi, Inc. - 7500 North Dreamy Draw Drive, Suite 120, Phoenix, Az 85020
(602) 870-3330            "I read the news today, oh boy!"  -- John Lennon