FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-15-2008, 07:36 PM
Terry Letsche
 
Default How do I run a script on unsuspend?

Hi. I am running F9 on a Toshiba laptop. Due to some ideosyncracies
of my wireless drivers, I think I should remove the wireless drivers
on suspend (hibernate), and modprobe them again on unsuspend. I've been
searching for information on this, and I'm baffled on how F9 "knows" to
suspend to disk when I close my laptop lid. I'm running acpid and it doesn't
appear to be there (only how to do a suspend when the power button is
pushed). I presume it's in pm-utils?

Anyway, specifically, my wireless gets messed up with a hibernate, so I'd like
to either a) do an 'ifup wlan0' on a resume from hibernation, or
b) rmmod rtl8187, etc. going into the hibernation, with modprobe rtl8187, etc.
and an ifup wlan0 on unsuspend. How would I do this?

Thanks!

Terry

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-15-2008, 08:02 PM
Tim
 
Default How do I run a script on unsuspend?

On Fri, 2008-08-15 at 13:36 -0500, Terry Letsche wrote:
> I'm baffled on how F9 "knows" to suspend to disk when I close my laptop lid.

Have a look in the power management (personal) preferences, which can
also be found through the screensaver preferences (in Gnome, at least).

> Anyway, specifically, my wireless gets messed up with a hibernate, so I'd like
> to either a) do an 'ifup wlan0' on a resume from hibernation, or
> b) rmmod rtl8187, etc. going into the hibernation, with modprobe rtl8187, etc.
> and an ifup wlan0 on unsuspend. How would I do this?

A script in /etc/pm/sleep.d/ along the lines of this template:

--------------------------------------------------------------------

#!/bin/bash

case "$1" in

hibernate|suspend)
#your sleeping commands go here
;;

thaw|resume)
#your waking commands go here
;;

*)
;;

esac

exit $?

-----------------------------------------------------------------------

But if you're using NetworkManager, it *should* be doing whatever's
necessary by itself, already. Of course that doesn't mean that it
actually *does*. :-

less /usr/lib/pm-utils/sleep.d/10NetworkManager

If you need some more clues, "rpm -qil pm-utils", and read through some
of the listed files.

--
[tim@localhost ~]$ uname -r
2.6.25.11-97.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 07:09 AM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org