Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my Mint 17 machine, "shutdown -c" does not seem to do anything. Even "killall -r shutdown" doesn't prevent the shutdown from taking place (it doesn't kill the process), and I have to use "killall -r -9 shutdown" to cancel the shutdown. All these tests have been run from the root account.
That seems such an odd feature which I never knew even existed for shutdown, a way to cancel it. I'd be wary of what services were already stopped as a result of the time delay between when I started it and when I decided to cancel it. Since you can stop one in progress in some manner, I'd not be so fussed why a particular form of a command doesn't work as advertised. But I'd also highly recommend that if you actually do issue a shutdown, that you let it complete and not try to cancel it.
You can cancel a shutdown that has been scheduled (e.g., "shutdown +10m") but has not yet begun. Once the actual shutting down procedure has begun, you can't cancel it. It's not clear which one the OP is trying to do.
I am trying to cancel a shutdown part way through the period specified. This is exactly what "shutdown -c" is supposed to do. I am using apcupsd, using the "onbattery" script to issue a shutdown with a delay of 5 minutes, and the "offbattery" script to cancel the shutdown if the power is restored in that period. These scripts are run as root.
If I issue "shutdown -h +5 &" from a root terminal, and then "shutdown -c" from the same terminal after, say, one minute, it works fine. So I guess it must be something to do with the apcupsd environment.
I am trying to cancel a shutdown part way through the period specified. This is exactly what "shutdown -c" is supposed to do. I am using apcupsd, using the "onbattery" script to issue a shutdown with a delay of 5 minutes, and the "offbattery" script to cancel the shutdown if the power is restored in that period. These scripts are run as root.
Are there any SELinux denials associated with this?
What happens if you run the "shutdown -c" manually from a terminal after apcupsd has scheduled a shutdown?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.