Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rmmod modules before sleep
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Fri Dec 03, 2004 11:45 am    Post subject: rmmod modules before sleep Reply with quote

How can I remove some modules before the iBook sleep, and modprobe them on wake-up?
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Fri Dec 03, 2004 1:13 pm    Post subject: Reply with quote

I assume you use pbbuttonsd (if you do not then it is time to check it out). If so, create a script in /etc/power/scripts.d/ and symlink it in /etc/power/event.d/. The script will be called by the daemon with two arguments, the first one is the command the daemon is about to execute ('profile', 'sleep' or 'wakeup') and the second is the power status ('ac' or 'battery'). Your script would look then like this:
Code:
#!/bin/bash
case "$1" in
    suspend)
        /sbin/rmmod <modules to be unloaded before sleep>
        ;;
    resume)
        /sbin/modprobe <modules to be loaded upon wakeup>
        ;;
esac

Check the documentation of pbbuttonsd for details.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum