Article 6JNVC /bin/elogind-inhibit

/bin/elogind-inhibit

by
lostintime
from LinuxQuestions.org on (#6JNVC)
I'm looking for Slackware examples using /bin/elogind-inhibit to cancel/abort a reboot/shutdown. In days of lore this could be done with /sbin/shutdown -c.

Much of what I find online about inhibiting is about systemd and unit files.

I've had only intermittent success adding a script in /etc/elogind/system-shutdown.

I want to avoid terminating various processes. If any such processes are running then fully cancel the reboot/shutdown. No timeouts or delays. Something like:

* loginctl reboot|shutdown initiates by whatever method.
* By design, loginctl runs a script in /etc/elogind/system-shutdown where the script tests for various running processes.
* If any such process is found the script fully cancels the reboot|halt.
* Adding log entries would be nice.

Probably some kind of flow chart how loginctl runs would be helpful.

I'm not interesting is script writing help. Only how to cancel reboot|shutdown with loginctl now controlling things.

Thanks.

Edit: I am able to detect processes using log entries, but the reboot|halt always launches anyway. The timeout/delay seems to be 25 seconds. Testing is all in runlevel 3 so no complications from running X.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments