LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to cancle shutdown (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-cancle-shutdown-855854/)

aggrishabh 01-12-2011 11:49 AM

How to cancle shutdown
 
Hi All,

I am having a situation, if some have to fire some command after firing shutdown or init 0.
is there any possibilities to cancel shutdown process if yes then how?

one more question: how a computer know that i have to shutdown if a user fire shutdown or init 0(just want to know the actual shutdown process what files the shutdown process calls and how it prevents a user to login (over the network)while shutting down.)

business_kid 01-12-2011 12:01 PM

(never tried this)try
sudo pkill -9 init

bathory 01-12-2011 12:08 PM

Better
Code:

shutdown -c

aggrishabh 01-13-2011 11:06 AM

Hi business_kid,

you mean to say instead of init 0 or shutdown command we must fire sudo pkill -9 init.
can you please elaborate this command i am afraid that this command is safe to use this will kill the init process abruptly leaving system in no state.

Please correct me if i am wrong.

jmc1987 01-13-2011 12:23 PM

Quote:

Originally Posted by bathory (Post 4221906)
Better
Code:

shutdown -c


I agree with this post

"# shutdown -c" is what I always use to cancel any shutdown

aggrishabh 01-13-2011 12:54 PM

Hi bathory,

where to give this command, after firing the shutdown command the shell is no longer exist.
i am trying to say that how can we cancel the on going shutdown process and how much time we have? means is there any particular process, this cancelling command works before that process get killed.

cin_ 01-13-2011 01:28 PM

shutdown -c
 
You will want to move to another terminal or tty instance.
If in X, just open another terminal and type...
Code:

# shutdown -c
Or if you are on the command line, you can hit Ctrl-Alt-F#, be it F2, F3... to open another instance, log in, and type your command...
Code:

# shutdown -c
..to cancel the shutdown.

bathory 01-14-2011 09:00 AM

Quote:

Originally Posted by aggrishabh (Post 4223258)
Hi bathory,

where to give this command, after firing the shutdown command the shell is no longer exist.
i am trying to say that how can we cancel the on going shutdown process and how much time we have? means is there any particular process, this cancelling command works before that process get killed.

shutdown -c works only if you've used the time option to shudown, like shutdown -h +1. Otherwise it's not possible to stop it.


All times are GMT -5. The time now is 10:19 PM.