Author Topic: Suspend/resume Scripts?  (Read 2828 times)

vorondil28

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • http://
Suspend/resume Scripts?
« on: March 05, 2006, 11:06:50 pm »
Hi all.

When I suspend my 6000L under OZ-3.5.3/GPE while the internal wireless interface is enabled, it can't be brought back up after resume unless the unit is rebooted.      This is a known bug (http://bugs.treke.net/show_bug.cgi?id=698).  However, I found that if I brought the interface down with "ifdown wlan0" before suspending, it would come back up with "ifup wlan0" after resume just fine.  

So my question is: Is there any way to script (sh, perl, etc') bringing down the interface on suspend (both when the power button is held and when it "falls asleep")?  It would also be nice to bring it back up on resume if it was up before suspend and leave it down if it was down before suspend.

This would be a nice workaround for the suspend bug until it's fixed but I don't know how to go about it.  Of course, writing the script to bring down the interface is cake, but I don't know how to get it to run on suspend.    


Any ideas?


Thanks in advance.  

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Suspend/resume Scripts?
« Reply #1 on: March 06, 2006, 04:11:48 am »
Check /etc/apm*
There are directories for different states (resume / suspend / etc).
Scripts placed in there are run when that state is activated,
Webmaster of hentges.net & Embedded Linux Developer.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Suspend/resume Scripts?
« Reply #2 on: May 28, 2006, 08:02:22 am »
I've been updating the OZ wiki with stuff about OZ/GPE not suspending/resuming usbnet properly... I'll take a look at the wifi issue soon.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.