Re: your mail
From: "Derek Broughton" <dbroughton@attcanada.ca>
> As near as I can tell, when you put stuff in /etc/network/interfaces, it gets
> executed at init time, before pcmcia gets started. If your card is already
> inserted, then when pcmcia _does_ start, ifup doesn't get executed. Perhaps
I'm
> misconfigured, but this is what's happening to me. I try to start firewall
> rules in /etc/network/interfaces and they don't start at power-up, but they
_do_
> start if I remove and reinsert the card. Now, looking at the file I see two
> potential problems:
>
> 1) it does "pre-up /etc/pcmcia/network start" - isn't this a bit circular,
when
> /etc/pcmcia/network.opts does "/sbin/ifup"?
OK, that obviously wasn't necessary - I probably did it myself long ago. I've
used etherconf to reconfigure my network without any damage - but without fixing
things.
> 2) the firewall script runs in a "pre-up" as well. It seemed like a good idea
> at the time, because I was thinking I wanted the firewall up before the link
was
> really active - but now that I think of it, I'm not sure dhclient will have
run
> before the firewall script starts - so I'll have to rtfm and check that. If
I'm
> right on this, it would explain why resetting the card will work, because dhcp
> always gets the same IP here, anyway.
I changed that and things are still not right.
If I do "ifdown eth0", the firewall is torn down. If I do "ifup eth0" the
firewall is rebuilt. This is good. But if I remove/replace the pcmcia card,
ifup/ifdown don't appear to be run. The script as I have it (taken from a
reinstall, so not my fault :-) ) contains:
is_true $DHCLIENT || \
is_true $PUMP || is_true $BOOTP || is_true $DHCP || \
if [ -z "$IPADDR" -a -f /etc/network/interfaces ] ; then
INFO="Debian network setup"
start_fn () {
log /sbin/ifup $1
}
stop_fn () {
log /sbin/ifdown $1
}
fi
It seems I'd picked up a version of pcmcia-cs from sid in one of my experiments,
but even having downgraded this to 3.1.33-6 it does _not_ seem to invoke
ifup/ifdown (all that seems different is the use of hotplug in sid). I _did_
reset DHCP="y" when I recreated the network.opts file.
Reply to: