init 6 and reboot

init 6 and reboot

Post by Joe » Sat, 21 Apr 2001 09:58:55



Is there any difference between 'init 6' and reboot command regarding what
they do to the system while shutting down?
 
 
 

init 6 and reboot

Post by Boyd Moor » Sat, 21 Apr 2001 07:48:20



> Is there any difference between 'init 6' and reboot command regarding what
> they do to the system while shutting down?

According to the man pages, it sounds like they are the same.  I'm
pretty sure /etc/shutdown is safer in cleaning up some things.  For a
quick reboot, I use (as root or sudo)
        /etc/shutdown -g 0 -i 6 -y  <optional message>
if I remember correctly (I'm not at my worksite right now).  The -g is
the seconds before doing it, the -i is the init state to go to, and -y
means to answer the questions 'yes' (Like: Do you really want to
shutdown?).

The Sun pages say to use /usr/sbin/shutdown in the same way.  Probably
my /etc/shutdown is a link to that.
Reference:

        http://docs.sun.com/ab2/

Boyd
--
T. Boyd Moore
Zech 4:6    KO4WK

 
 
 

init 6 and reboot

Post by Morten Seeber » Sat, 21 Apr 2001 08:07:57


reboot doesnt run all the Kxx (kill) scripts, it just syncs the disk and
reboot, init 6 goes back through the /etc/rcx.d Kxx scripts in order before
rebooting.


Quote:> Is there any difference between 'init 6' and reboot command regarding what
> they do to the system while shutting down?

 
 
 

init 6 and reboot

Post by rick » Sat, 21 Apr 2001 11:22:49


init 6 would execute the K scripts at rc*.d directories,

but reboot does not

Quote:> Is there any difference between 'init 6' and reboot command regarding what
> they do to the system while shutting down?

 
 
 

init 6 and reboot

Post by Ron Zcor » Tue, 24 Apr 2001 00:49:59


Learned the difference the hardway.  Scripts in rc3.d directory to shutdown
source control databases were never executed when system was rebooted using
reboot.

Thought the source control system was being pushed past its limits and
purchased new "expensive" application. Settting up and testing scripts for new
application  exposed issue with not using init 6.

 
 
 

init 6 and reboot

Post by Dave Uhrin » Tue, 24 Apr 2001 01:18:50



> Learned the difference the hardway.  Scripts in rc3.d directory to
> shutdown source control databases were never executed when system was
> rebooted using reboot.

> Thought the source control system was being pushed past its limits and
> purchased new "expensive" application. Settting up and testing scripts
> for new
> application  exposed issue with not using init 6.

There is no better way to learn than the hard way, is there?  I bet you
will never use "reboot" again :-)

Try another one.  Never issue rm -rf /directory.  What happens if you
inadvertently hit the Enter key on the keystroke after /?

 
 
 

init 6 and reboot

Post by Logan Sh » Tue, 24 Apr 2001 01:44:34




Quote:>Try another one.  Never issue rm -rf /directory.  What happens if you
>inadvertently hit the Enter key on the keystroke after /?

And then there's the famous

        rm * .o

instead of

        rm *.o

in a directory full of important source code.

Personally, when I'm doing an "rm -rf /foo/bar" or similar as root, I
usually do a "ls /foo/bar", make sure the path is what I think it is,
and then use the command history to recall that command and change
it to the "rm" one.

  - Logan
--
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_

 
 
 

init 6 and reboot

Post by Michael Wa » Tue, 24 Apr 2001 02:33:16



Quote:>Try another one.  Never issue rm -rf /directory.  What happens if you
>inadvertently hit the Enter key on the keystroke after /?

Then what is the alternatives if I have under /directory
all sorts of strange files with dots, and control chars, spaces, etc?
 
 
 

init 6 and reboot

Post by Alan Coopersmit » Tue, 24 Apr 2001 02:46:00




|>Try another one.  Never issue rm -rf /directory.  What happens if you
|>inadvertently hit the Enter key on the keystroke after /?
|
|Then what is the alternatives if I have under /directory
|all sorts of strange files with dots, and control chars, spaces, etc?

cd / ; rm -rf directory

--
________________________________________________________________________


  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

init 6 and reboot

Post by Michael Wa » Tue, 24 Apr 2001 03:09:19



Quote:

>cd / ; rm -rf directory

Thanks. Replacing ";" with "&&" is safer.
 
 
 

init 6 and reboot

Post by dex » Tue, 24 Apr 2001 03:13:54


8)   Rule #1, check where you are.


> >cd / ; rm -rf directory

> Thanks. Replacing ";" with "&&" is safer.

 
 
 

init 6 and reboot

Post by Michael Jank » Tue, 24 Apr 2001 03:27:19



> Try another one.  Never issue rm -rf /directory.  What happens if you
> inadvertently hit the Enter key on the keystroke after /?

Or try using a GUI to deleted user accounts & check the box that says
'Delete Home Directories'. It will work slick until you delete a user
whose home directory is /.

Then you have a problem.

--Mike

--
-----------------------------------------
Michael Janke
Director, Network Services
Minnesota State Colleges and Universities
651-649-5982
-----------------------------------------