# # init 6 inittab ––>Re: Automatic Shutdown/Reboot Unix and older Linux, Upstart
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

shutdown, init 6 inittab, reboot

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2004 Tony Lawrence

The "shutdown" command takes options. For example, Linux lets you specify halting or rebooting or just going to single user mode. However, shutdown really uses init to accomplish this.

The "shutdown" command takes options. For example, Linux lets you specify halting or rebooting or just going to single user mode. However, shutdown (on older systems) really uses init to accomplish this. So when you tell shutdown to reboot, you are really telling it to do whatever inittab tells it to do for run state 6.

Systems that have moved beyond inittab probably work in a similar way. See, for example Upstart shutdown process.

Other OSes make that more obvious: SCO's shutdown has a -i flag to specify the desired init state.

The reason I bring that up is that I've had a situation where, for their own esoteric reasons, a client wanted to disable the option so that it would NOT reboot. On SCO, the only thing that causes the reboot is the "uadmin 2 1" in inittab. On Linux, it's the "/etc/rc.d/rc 6" that ends up running /etc/rc.d/rc6.d/S01reboot

On SCO, it's interesting to note that the /etc/reboot command doesn't call "uadmin 2 1"; it calls "uadmin 2 2", which is what init 5 calls. So on SCO, "reboot" is not quite the same as a shutdown -i6. On Linux (older Linux), S01reboot ends up calling "reboot".

Just like anything else, shutdown can hang and fail to finish. See (for example) shutdown script hangs.

If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> init 6 inittab ––>Re: Automatic Shutdown/Reboot Unix and older Linux, Upstart


Inexpensive and informative Apple related e-books:

Take Control of iCloud

iOS 10: A Take Control Crash Course

Take Control of High Sierra

Take control of Apple TV, Second Edition

Take Control of OS X Server





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





Better to fight for something than live for nothing. (George S. Patton)




Linux posts

Troubleshooting posts


This post tagged:

Kernel

Linux

SCO_OSR5



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode