Hi, [email protected] (Kamil Jońca) writes: > There is laptop with "stretch/sid" on it. > I want umount all remote filesysems before suspending/hibernating it. > When google I found only solutions referring to pm-utils and > /etc/pm/sleep.d sripts. But this does not work for me. It looks like > pm-hibernate is not even calling. > So my question is: how can I put script to run before hibernate? Or what > should I read?
When using systemd instead of pm-utils, one can hook into the "sleep.target" (or only "suspend.target" or "hibernate.target"). There is also the /lib/systemd/system-sleep directory, but its documentation[1] says its use should be considered a hack. There are some examples how to do so on [2]. Ansgar [1] <man:systemd-sleep(8)> [2] <https://wiki.archlinux.org/index.php/Power_management#Sleep_hooks>

