[ltp] Hibernate on T41P

Rob Browning linux-thinkpad@linux-thinkpad.org
Mon, 21 Jun 2004 18:21:14 -0500


Brian Nelson <nelson@bignachos.com> writes:

>> The two .sh scripts mentioned also both contain an "ifdown ath0"
>> which, via /etc/network/interfaces, calls "modprobe -r ath0" to remove
>> the madwifi module before going down.  
>
> Hm, how do you accomplish that through /etc/network/interfaces?  Using
> "down" or "post-down"?

Like this:

  iface ath0 inet dhcp
    wireless_key *****
    wireless_essid *****
    up /etc/init.d/shorewall refresh
    post-down modprobe -r ath0
    post-down /etc/init.d/shorewall refresh

I run shorewall on the laptop so I don't have to worry so much about
what's going on on the local network.  If you do this, the laptop will
actually be the "fw" zone itself, which is normally blocked in both
directions, so you'll need to add suitable policies allowing traffic.

I also have some other entries for other locations I visit:

  # this place needs an essid, but not a key...
  iface ath0-foo inet dhcp
    wireless_essid foobar
    up /etc/init.d/shorewall refresh
    post-down modprobe -r ath0
    post-down /etc/init.d/shorewall refresh

and you can invoke this via "ifup ath0=ath0-foo", etc.

Right now I don't automate anything, though I might eventually.  I
just issue the ifup/down commands manually as root when I need to.

> Also, how do you bring the interface back up on resume?  Do you have to
> do it manually, or can that also be accomplished in /etc/acpi scripts?

I don't bring it back up automatically, I just do it by hand since I
don't know where I'll be when I wake the machine back up.  Although
there are several different packages available if you want to try to
do autodetection.  As yet, I haven't decided that I want/need to head
that direction.

> Sorry for all the questions, but the documentation is lacking.

No problem.  Hope this helps.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4