Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Fujitsu-Siemens H240, Slackware-current, KDE 4.3.2.

I would like to perform some additional steps when my laptop suspends.

I found this SU question which is very close to what I am asking, however the scripts that I placed in that directory are not being called for me.

This could be a Slackware thing, or its possible that KDE has a different location for these scripts.

I am suspending by using the "Suspend" radio button on the "Guidance Power Manager" dialog of KDE.

Is there a standard location where I can place my scripts so they'll be run before and then after the machine has suspended?

share|improve this question
up vote 1 down vote accepted

I have managed to get this working on my system. I'm pretty sure it was because I was using symbolic links.

I regularly backup my /home, but nothing else. In order to catch the few scripts I've modified in /etc I use a directory off my home dir and I then add a symlink in the /etc location.

In this case, the script which walks through these directories is checking that the file exists and is a "regular file":

if [ -f "$syshooks/$base" ]; then
  hook="$syshooks/$base"

As a result, my scripts were not being considered at all. By copying them directly into /etc/pm/sleep.d they are all called correctly.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .