notification of resume

2013-08-02 Thread Hugo Vanwoerkom

Hi,

How would a script know that the system has just been resumed from 
hibernation?


Hugo


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/ktghb3$q8b$1...@ger.gmane.org



Re: notification of resume

2013-08-02 Thread Claudius Hubig
Dear Hugo,

Hugo Vanwoerkom wrote:
 How would a script know that the system has just been resumed from 
 hibernation?

assuming that you use the pm-utils to hibernate/thaw your system, you
can use /etc/pm/sleep.d:

   /etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d
  Programs in these directories (called hooks) are combined and
  executed in C sort order before suspend and hibernate with as
  argument 'suspend' or 'hibernate'. Afterwards they are called
  in reverse order with argument 'resume' and 'thaw'
  respectively. If both directories contain a similar named file,
  the one in /etc/pm/sleep.d will get preference. It is possible
  to disable a hook in the distribution directory by putting a
  non-executable file in /etc/pm/sleep.d, or by adding it to the
  HOOK_BLACKLIST configuration variable.


Best,

Claudius
-- 
Please don’t CC me.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130802184509.241b6...@ares.home.chubig.net



Re: notification of resume

2013-08-02 Thread Hugo Vanwoerkom

Claudius Hubig wrote:

Dear Hugo,

Hugo Vanwoerkom wrote:
How would a script know that the system has just been resumed from 
hibernation?


assuming that you use the pm-utils to hibernate/thaw your system, you
can use /etc/pm/sleep.d:

   /etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d
  Programs in these directories (called hooks) are combined and
  executed in C sort order before suspend and hibernate with as
  argument 'suspend' or 'hibernate'. Afterwards they are called
  in reverse order with argument 'resume' and 'thaw'
  respectively. If both directories contain a similar named file,
  the one in /etc/pm/sleep.d will get preference. It is possible
  to disable a hook in the distribution directory by putting a
  non-executable file in /etc/pm/sleep.d, or by adding it to the
  HOOK_BLACKLIST configuration variable.


I don't use pm-utils. Maybe I should. Thanks Claudius.

Hugo


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/ktgu77$afa$1...@ger.gmane.org