Article 60544 of comp.sys.sun.admin:
Path: mri.com!newsfeed1.aimnet.com!news.aimnet.com!peerfeed.ncal.verio.net!nntp2.cerf.net!news.idt.net!ais.net!news-peer.sprintlink.net!news.sprintlink.net!Sprint!worldnet.att.net!newsadm
From: Chip Bennett <Chip.Bennett@worldnet.att.net>
Newsgroups: comp.sys.sun.admin
Subject: Re: shutdown -i0 vs. init 0 vs. halt
Date: Sun, 19 Oct 1997 00:56:03 -0500
Organization: AT&T WorldNet Services
Lines: 29
Message-ID: <3449A0F2.760B5493@worldnet.att.net>
References: <34467C67.66FF518A@ubs.com>
NNTP-Posting-Host: 12.66.2.135
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.01 [en] (Win95; U)
To: "Cao,Kexi" <kexi.cao@ubs.com>
X-Priority: 3 (Normal)

Cao,Kexi wrote:

> Could someone tell me the technical detail on shutdown vs. init 0 vs.
> halt. I have some rough ideas but am not sure the specific
> differences.
> Thanks.
>
> KC
>
> --
> Kexi Cao (KC)                  Union Bank of Switzerland
> kexi.cao@ny.ubs.com            299 Park Ave., New York, NY 10171
> (212)-821-6516

"halt" pretty much just syncs the disks and then stops the CPUs.  Pretty
abrupt, but better than turning off the power.

"shutdown -i0" and "init 0" run the rc0 scripts first.  "shutdown" is
not much different than "init", except that "shutdown" allows a grace
period and "wall"s a message to your users.  "init" changes the state of
the init daemon process to whatever value you pass as an argument.
/etc/inittab has a list of commands to execute based on the new state.
For "init 0" look for the state "0" command(s) and follow the calls to
subsequent scripts to trace down exactly what happens.  If you don't
have access to AnswerBook to look up these commands, may I recommend
http://docs.sun.com

Chip Bennett



