Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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