0

/etc/pm/sleep.d/00_update has these permissions:

-rwxr-xr-x 1 root root  148 oct 28 09:46 00_update

and the following content:

#!/bin/bash

case "$1" in
  hibernate|suspend)
    echo suspended >> ~/.state
    ;;
  thaw|resume)
    echo awake >> ~/.state
    ;;
esac

but nothing happens after suspending, hibernating or restarting the system.

In the folder there are other files, namely:

-rwxr-xr-x 1 root root  210 may 15  2014 10_grub-common
-rwxr-xr-x 1 root root  660 dic  6  2013 10_unattended-upgrades-hibernate
-rwxr-xr-x 1 root root 1260 may 23  2012 novatel_3g_suspend

Is there any additional step in order to make 00_update run properly?

1

Since your bash script in /etc/pm/sleep.d/00_update is run as the root user, ~/.state means something other than your home directory.

Replace both occurrences of ~/.state with the absolute path, something like /home/w3/.state (YMMV).

Also, if you use an encrypted home directory, there will be times when it is not mounted (when you are not logged in), so consider writing your file into /tmp.

  • I feel so stupid... – nightcod3r Oct 28 '16 at 13:04
  • While this was just to test functioning, my interest is in synchronizing repositories with Mercurial after leaving the workplace. However, having solved the directories issue, now the hg push seems to get stuck, this message is stored in a log file: nothing changed pushing to https://user:***@bitbucket.org/user/repository and nothing else happens, as if the internet connection would be lost. Actually, the computer does not complete suspension. – nightcod3r Oct 28 '16 at 13:26
  • (The very same command works fine from the command line, of course.) – nightcod3r Oct 28 '16 at 13:32
  • Ask a 2nd question about hg push problem in a question of its own. – waltinator Oct 31 '16 at 15:44
  • Please, find it here: askubuntu.com/questions/843690/… – nightcod3r Oct 31 '16 at 15:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.