[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

interfaces, mapping, etc

Hey aj, I want to make sure I'm approaching this right. And I'm kinda making
it up as I go, so please bear with me. 

This wlan-ng foo wants to have a /etc/init.d/wlan script that starts the
interface, but that is braindead for many reasons on debian, so:

auto wlan0
mapping wlan0
        script /usr/local/bin/map-scheme
        map home wlan0-home
        map managed wlan0-managed

iface wlan0-home inet static
        pre-up /usr/share/wlan-ng/start wlan0-home
        down /usr/share/wlan-ng/stop
iface wlan0-managed inet dhcp
        pre-up /usr/share/wlan-ng/start wlan0-managed
        down /usr/share/wlan-ng/stop

I want to make sure this is a sane way to expect mappings to be used though.
The whole mappings thing is a bit well, undocumented. Would it make sense to
have a centralized program to return the current scheme for scheme-based setups
like this one? I'm thinking of something equivilant to cardctl scheme.
It would be really easy to write, I imagine; just something to cat a value
to and from someplace in /var.

Also do you mind if other network related packages puts configuration stuff in
/etc/network? In this case it would be some kind of specification of the
wireless network parmaters for wlan-ng, hopefully in a interfaces-like file

Finally, is there any way for a script in one of the if-*.d directories to know
what interface is coming up/down? If there were I could simplify the
network/interfaces stanzas some by making that script handle the wlan-ng stuff
for the wlan* interfaces. Is the IFACE and IF_* in the environment part of
the interface to these scripts, and if so, why is it not documented?

Oh hmm, even if those variables are documented to use, I don't see any way to
get at the mapped name of the interface (wlan0-home, wlan0-managed, whatever).
So I'd like to be able to put this in if-pre-up.d, but I cannot see any way to
do it:

set -e
case "$IFACE" in
        /usr/share/wlan-ng/start $IFACE_MAPPED

I could make it run the /usr/local/bin/map-scheme but that
is not a well-defined program name, and it might be expensive
to run. Help?

see shy jo

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: