On 6/16/06, Raphael Hertzog <[EMAIL PROTECTED]> wrote:
[ please keep me in CC since the BTS hasn't affected a maintainer to
acpi-support yet ]
thanks for your bug reports. You appear to have some knowledge on the
topic and evidently some interest, would you be interested to co-maintain
the package?

Sure.  The only hardware I'd be able to test acpi-support on is my IBM T43p and an older Dell laptops.

My hasty reporting of this bug isn't a good start though ;)

> suspend.d/55-down-interfaces.sh takes down all interfaces that exist,
> even those that are already down and resume.d/62-ifup.sh diligently
> brings up all the interfaces that were taken down.  This means that my
> ethernet interface (which is managed through ifplugd) was correctly
> down, but acpi-support tries to bring it up on resume.
>
> A simpler alternative that would also fix this issue would be
> something like:

Can you explain me why it would fix the issue?

It only acts on the interfaces that ifupdown believe is up (and only brings back some of those interfaces, depending on what resume policy we choose to implement - see below)

> suspend.d/55-down-interfaces.sh:
>  ifdown -e lo -a

The -e switch of ifdown is undocumented, what does it do? Exclude an
interface ?

Ah. it appears it was deprecated in ifupdown 0.6.5.  Shows how long its been since I updated my suspend script.  Yes it excludes an interface, but we can skip that and just do ifdown -a without much extra cost.

> If you want to be more persistent and fall through to ifconfig down,
> as the current 55-down-interfaces.sh does, you should walk through
> `cut -d= -f 1 /etc/network/run/ifstate`, rather than all interfaces
> that currently exist.

How can a network interface appear in ifconfig if it's not up ?

You are completely right.  It appears ifplugd actually brings my interface up, but doesn't give it an IP address yet.

> resume.d/62-ifup.sh:
>  ifup -a

This would start all interfaces marked auto in /etc/network/interfaces and not
necessarily only those that were up when we suspended.

What do I miss?

Yes, it would bring up those same interfaces that were brought up on system boot. That would fix my immediate problem (disagreement over ifplugd-managed interfaces), but be a change from current behaviour.

I can see several policies we might want to implement here:

Bring up each interface exactly as it was before:
 # suspend
 INTERFACES=$(cat /etc/network/run/ifstate)
 ifdown -a
   ...
 # resume
 for i in $INTERFACES; do ifup $i; done

Bring up each interface that was up before, but let mapping scripts recheck for different networks, etc (good idea given that people suspend laptops precisely because they are about to move them)
 INTERFACES=$(cut -d= -f1 /etc/network/run/ifstate)
 ifdown -a
   ...
 for i in $INTERFACES; do ifup $i; done

Take down / bring up interfaces that the user has tagged as 'allow-suspend' in /etc/network/interfaces
 ifdown --allow=suspend
   ...
 ifup --allow=suspend

Take down all up interfaces, and only bring up those the user normally brings up at system boot (fwiw, this is actually what I prefer, since the network environment where I resume my laptop usually bears no resemblance to where I suspended it)
 ifdown -a
   ...
 ifup -a

--
- Gus

Reply via email to