On 06/23/2011 09:04 AM, Denys Vlasenko wrote:
On Wed, Jun 22, 2011 at 11:10 PM, David Henderson
<[email protected]> wrote:
I think I see where the problem lies - I
don't have a /var/run/ifstate file! What binary creates this file?
ifup and ifdown. (Although on some systmes they aren't binaries,
they are scripts).
I'm assuming that since I don't call ifup, that might be why the file isn't
being created... Perhaps this could be created manually so ifdown can work?
I'm
not configuring the iface by hand, but with utilities such as ifplugd,
udhcp, and if* binaries.
If you dont use ifup to up the iface, why do you use ifdown
to deconfigure it?
Because the script takes into account disconnected interfaces and assigns a
169.254.x.x address, thus a call to ifdown. With the problems experienced
with the ifdown binary, a temporary (or permanent) work around is to use the
ifconfig binary (which has no problems).
Also, the /etc/network/interfaces file does
get created in a script, but matches all the naming conventions and
works just fine. Thoughts?
You seem to be confused. /etc/network/interfaces should be edited by
admin, not created by scripts.
Nope, no confusion. /etc/network/interfaces is created dynamically by
scripts which has actually produced less headache if NIC's are switched or
configuration changes need to occur. Sure beats the "by hand" way of doing
it! :)
You are trying to use ifup/ifdown in a wrong way.
Every tool has some design idea behind it, "how it supposed to be used".
ifup/ifdown tools are built with the assumption that user expesses his network
configuration in /etc/network/interfaces (such as "this iface is
static, this iface
is DHCP, ...") and then uses exclusively ifup/ifdown to up/down interfaces.
And ifup and ifdown will call necessary other lower-level programs to do
the requested operation - not the user.
Not that I like this design idea (I don't - it's doesn't cover a lot
of real-world
situations), but that's how ifup/ifdown are designed. If you really want to use
these tools, you are better to conform to their design.
Trying to use ifdown without ifup totally undermines it.
Thanks for the tips Denys. Apparently you really can't use one without
the other (which I was trying to do). :) As stated, I created a
temporary work around using "ifconfig ... down" which is working without
problems so I'll just make it a permanent change. Thanks for your help
and efforts in this matter.
Dave
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox