inittab question

From: Spalding, Steve <SSPALDIN_at_mem-ins.com>
Date: Tue, 28 Apr 1998 12:08:22 -0500

Hello managers!

I've been poking around at some of the UNIX startup files, and I can't
figure something out. When you run an init s or shutdown, by default
UNIX takes you to single user mode. This is accomplished through a line
in the /etc/inittab file: ss:Ss:wait:/sbin/rc0 shutdown < /dev/console >
/dev/console 2>&1

This executes /sbin/rc0, passing "shutdown" as a parameter. Here is the
section of the /sbin/rc0 script file that runs when "shutdown" is passed
as a parameter:

#
# Init single-user state if shutdown
#
if [ "$ARGONE" = shutdown ]; then
        /sbin/init S

This runs /sbin/init S which logically should take you through the
/etc/inittab file again, running /sbin/rc0 shutdown, thus creating an
endless loop. I have verified that this does not happen as we always end
up at single user mode, but why do we not end up in an endless loop?

Any input is appreciated!

Thanks!


Stephen Spalding
Associate System Administrator
Missouri Employers Mutual Insurance
sspaldin_at_mem-ins.com
1000 West Nifong
Columbia, MO 65203
(573) 499-4230
(800) 442-0590
fax (573) 499 - 4310
Received on Tue Apr 28 1998 - 19:16:41 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT