The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. February 11, 2012, 10:28:33 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: sudo shutdown !  (Read 3673 times)
NYDAz
Expert
****
Offline Offline

Posts: 209


The night stalker


View Profile WWW
« on: June 29, 2009, 07:16:08 AM »

my computer doesn't respond to this command !

I've opened terminal : $sudo shutdown +40 !

After 40 minutes linux goes to shutdown !

Exits linux and then appears the shutdown screen ! Everything is good until 90% ! There it get stuck !

PS : I'm using LinuxMint !

Any help is appreciated as always

 Cry
Logged

I'm an educated fool, with money on my mind !
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: June 29, 2009, 08:34:14 AM »

Code:
sudo shutdown -P now

Need to give it a flag.

Shutdown only takes you to runlevel 3, it won't power down via APCI.

-r = reboot
-P = power down
etc.
Logged

hai
NYDAz
Expert
****
Offline Offline

Posts: 209


The night stalker


View Profile WWW
« Reply #2 on: June 29, 2009, 08:56:08 AM »

Code:
sudo shutdown -P now

Need to give it a flag.

Shutdown only takes you to runlevel 3, it won't power down via APCI.

-r = reboot
-P = power down
etc.

that worked .... ! Thanks VS

Can you tell me please how to cancel a shutdown that will occur ?  Roll Eyes
Logged

I'm an educated fool, with money on my mind !
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #3 on: June 29, 2009, 10:05:43 AM »

Well, a shutdown isn't a monolithic event like on a Windows system. You can't issue another shutdown command to stop an already-scheduled one.

I'm not at a place where I can test this, but try this:

issue a shutdown command like shutdown -P +120
do this command:
Code:
sudo ps ax | grep shutdown

if you see a shutdown process, you should be able to kill it (need to sudo), and that will prevent the shutdown.
Logged

hai
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #4 on: June 29, 2009, 11:01:19 AM »

If you catch it before it kicks off... if you stop the process mid-stream (you'd have to be quick I'm thinking) you'd probably be better off to perform a shutdown -r now to let all process that had been stopped before you halted the shutdown to get back up and running. Weird things can happen on a box if you're half-way shut down.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
NYDAz
Expert
****
Offline Offline

Posts: 209


The night stalker


View Profile WWW
« Reply #5 on: June 29, 2009, 12:52:47 PM »

In understand ! I need to -R instead of killing the process ! Is more recommended ! Right ?

Weird things can happen on a box if you're half-way shut down.
Ditto
Logged

I'm an educated fool, with money on my mind !
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #6 on: June 29, 2009, 01:14:57 PM »

No, Perks is not fully understanding I don't think.

You can kill the shutdown call as long as you kill it long before it executes if you schedule it far in advance. Like in the example I gave you.
Logged

hai
NYDAz
Expert
****
Offline Offline

Posts: 209


The night stalker


View Profile WWW
« Reply #7 on: June 29, 2009, 01:16:19 PM »

You can kill the shutdown call as long as you kill it long before it executes if you schedule it far in advance.
That's what I'm thinking too  Cry
Logged

I'm an educated fool, with money on my mind !
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #8 on: June 29, 2009, 01:49:05 PM »

No, Perks is not fully understanding I don't think.

You can kill the shutdown call as long as you kill it long before it executes if you schedule it far in advance. Like in the example I gave you.

No, I get you VS - I was meaning exactly the same thing - so long as you halt the shutdown BEFORE it kicks in (so it's still in pre-timer mode, not actually shutting things down) then you're good to go ... if it gets going it'll get dodgy for you to stop it. I'm right with you.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #9 on: June 29, 2009, 05:38:10 PM »

 Nerd
Logged

hai
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!