-
Notifications
You must be signed in to change notification settings - Fork 513
Replace poweroff call with magic command reboot rather than waiting for ... - #4
Replace poweroff call with magic command reboot rather than waiting for ... #4boydjd wants to merge 1 commit into
Conversation
...or filesystem syncing and services to shut down gracefully.
hephaest0s
commented
May 5, 2015
poweroff -f doesn't wait for services to shut down gracefully. Sync command also doesn't take more than a second. Will make a decision about this later.
boydjd
commented
May 5, 2015
The length of time of the sync command is going to depend on what is actually happening when it's executed and what filesystems are mounted.
Thinking about it now though, I'm not sure why a python script is even needed. This could all be done with a udev rule on removal of a device.
deekayen
commented
May 6, 2015
@boydjd I'd be interested in seeing that fork. I already experimented by converting the Python version to Bash in my fork. Seems to work - https://github.com/deekayen/usbkill
terrorbyte
commented
May 9, 2015
I also have a fork that solves this, but it uses udev and launchd so there is no infinite looping: https://github.com/terrorbyte/usbkill
NateBrune
commented
Feb 18, 2016
I have a fork that implements this as a linux driver.
https://github.com/NateBrune/silk-guardian
It maybe preforms a little better than userspace programs?
...filesystem syncing and services to shut down gracefully.