View previous topic :: View next topic |
Author |
Message |
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Fri Aug 24, 2007 2:46 am Post subject: init.d: when suspending? |
|
|
Hi.
I need to write a init script (/etc/init.d) that can distinguish between the normal shutdown and suspending.
I am using suspend2/hibernate script.
Is there a simple way to do this?
Thanks.
Paulo |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Fri Aug 24, 2007 6:59 am Post subject: |
|
|
My guess is, your are looking for hibernate-scripts: a collection of scripts, which takes down some init-scripts before suspending, and restoring them at resume.
If not, could you elaborate what you want to do.
cheers
V. |
|
Back to top |
|
|
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Fri Aug 24, 2007 2:04 pm Post subject: |
|
|
Yes. I know that I can write 2 scripts: one to put in the default runlevel and the other to be fired by the hibernate script. But there may be something I can check so that I can put everything in one script only.
Code: |
if [ <is suspending> ]; then
# suspending
...
else
# normal shutdown
...
fi
|
|
|
Back to top |
|
|
beatryder Veteran
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Fri Aug 24, 2007 4:45 pm Post subject: |
|
|
no, he means the hibernate-script package. _________________ Dont make it idiot proof, make it work.
Neucode.org
<suppressed key> |
|
Back to top |
|
|
|