Is there a way to stop a restart from occurring after a policy has been pushed out?

bpavlov
Honored Contributor

The short story is that I pushed out software that required a restart. I set the restart to occur within 2 hours after the policy completes. However, one user had the policy forced on them because they were past the deferral date I setup. Now the user is in a meeting and Casper naturally says it's going to restart within the next 90 mins. Is there a way to stop the reboot from occurring?

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

Not 100% certain it will work when it's pushed via Casper but you can try running:

sudo killall shutdown

On the Mac.

Edit: corrected killall typo. Also, you may want to first run a

ps axc | grep shutdown

to see if the delayed shutdown command is actually running on that Mac. If it is, the killall should stop it and prevent the restart. Just run the ps axc command again afterwards to confirm it no longer shows up in the process list.

View solution in original post

3 REPLIES 3

mm2270
Legendary Contributor III

Not 100% certain it will work when it's pushed via Casper but you can try running:

sudo killall shutdown

On the Mac.

Edit: corrected killall typo. Also, you may want to first run a

ps axc | grep shutdown

to see if the delayed shutdown command is actually running on that Mac. If it is, the killall should stop it and prevent the restart. Just run the ps axc command again afterwards to confirm it no longer shows up in the process list.

PeterClarke
Contributor II

Well, there's the Obvious..

Don't mark it as a restart policy in the first place..
Then it won't cause a restart.
If it actually requires a restart, in order to engage,
then of course - without a restart, it won't yet be operational until after a restart - some time later..

We do that in several cases..
Rather depends on what the item is.

With Operating system stuff, it's always wise to do required restarts.
- in that case schedule them for some off-period if necessary.

In some ways this is better then the hacks to stop a restart..
And at some point you must restore "normal operational behaviour.."

bpavlov
Honored Contributor

Thanks @mm2270 That did the trick.

@PeterClarke The required restart was intentional. The problem here is that the user kept deferring the update for 2-3 weeks. Can't really do anything about an end user that keeps deferring. I just hope most end users read it and do restart when they have 2 mins to spare. But if they don't and a situation like this happens then I have no choice but to help them out. After all, they are the ones making money for the company. I'm here to support them with their technological needs and make sure they can continue to make money for the company so that I can keep my job.