Hi Carlos, [...]
For example, send pending nntp messages before going into hibernation.
This is because there is a cron job that does it, but I might write a message and go into hibernation immediately, before the cron job runs. If I awake the machine a day later, the upstream server rejects the post because it is too old.
I tried to put things like that into the NetworkManager dispatcher scripts in /etc/NetworkManager/dispatcher.d, but even here sometimes it is too late, because NM stops the interfaces faster than my dispatcher scripts finished. And: It works only with NM versions > 1.2.2. At the moment in Leap 42.2 I use 1.4.4 from the Tumbleweed repo. You might be lucky, if the actions to be performed don't last too long. ------------------------< snip snip snip >----------------------------- #!/bin/bash INTERFACE="$1" ACTION="$2" case "$ACTION" in pre-down|vpn-pre-down) # ... ;; esac ------------------------< snip snip snip >----------------------------- If anyone has a better workflow for things like that, I would be really grateful.
For example, abort hibernation if vmware is running, or if there is an active nfs share. The reason is because I have seen crashes in both circumstances.
To my knowledge there is no way to abort an initiated hibernation process from any of the given scripts.
Another thing I did was stop and start ntp. On the laptop, instead, I trigger ntptimeset on restore, I do not use the daemon.
This can also be done via NM's dispatcher scripts. [...] Another thing you could try is to write your own dbus scripts listening to the appropriate events. There you can use inhibitors to slow down the hibernations process for a maximum of 5 seconds. If you are interested, I could send you my dbus scripts for logind, which handles things like sleep and resume, and for NM, which handles network interface ups and downs. Based on perl and the Net::DBus module, the scripts are far from being perfect, but for my notebook and my desktop they do almost every job, I wanted to implement.
Cheers / Saludos,
Carlos E. R.
Bye. Michael. -- Michael Hirmke -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org