Package: ifupdown
Version: 0.6.5
Severity: important

As you can see in the included /etc/network/interfaces I use mapping.
After the last update I did mapping stoped to work I think this is
becouse ifupdown passes wrong parameter to ifconfig. 

--- "ifup -v wlan0" output start ---
canepalnx:/home/sc# ifup -v wlan0
Running mapping script /usr/local/bin/wlan on wlan0
Configuring interface wlan0=wlan0-office (inet)
cp /etc/resolv.conf.office /etc/resolv.conf
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools

ifconfig wlan0-office 172.16.1.28 netmask 255.255.0.0 broadcast
172.16.255.255         up
SIOCSIFADDR: No such device
wlan0-office: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
wlan0-office: ERROR while getting interface flags: No such device
wlan0-office: ERROR while getting interface flags: No such device
Failed to bring up wlan0-office.
--- "ifup -v wlan0" output end ---

--- /etc/network/interfaces start ---
auto lo #wlan0
iface lo inet loopback

mapping wlan0
    script /usr/local/bin/wlan
    map HOME wlan0-home
    map OFFICE wlan0-office
    map OTHER wlan0-other

iface wlan0-office inet static
    pre-up cp /etc/resolv.conf.office /etc/resolv.conf
    address 172.16.1.28
    netmask 255.255.0.0
    network 172.16.0.0
    broadcast 172.16.255.255
    gateway 172.16.1.1
    wireless_channel 11
    wireless_essid colomboWIFI
    up ip route add to 192.168.168.0/24 via
172.16.0.250                        

iface wlan0-home inet dhcp 
    pre-up cp /etc/resolv.conf.home /etc/resolv.conf
    pre-up /usr/sbin/update-exim4.conf
    wireless_key off
wireless_mode managed
    wireless_channel 6
    wireless_essid casaDolceCasa

iface wlan0-other inet static 
   address 192.168.98.100 
   netmask 255.255.255.0 
   network 192.168.98.0 
   broadcast 192.168.98.255 
   gateway 192.168.98.254 
   wireless_rate 11MB
--- /etc/network/interfaces end ---

--- /usr/local/bin/wlan start ---
#!/usr/bin/env perl 

use strict;

my $line;
my @lines;
my @fields;

`ifconfig $ARGV[0] 0.0.0.0 up`;
@lines=split(/\n/,`iwlist $ARGV[0] scan`);
foreach $line (@lines) {
        $line =~ s/\s*//;
        if ($line =~ /\bESSID/) {
                @fields = split(/:/,$line);
                $fields[1] =~ s/\"//;
                $fields[1] =~ s/\"//;
                if ($fields[1] eq 'casaDolceCasa') {
                        print "wlan0-home\n";
                } 
                if ($fields[1] eq 'colomboWIFI') {
                        print "wlan0-office\n";
                }
                else {
                        print "wlan0-other\n"
                }
        }
}

--- /usr/local/bin/wlan end ---

System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-386
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]       1.4.47       Debian configuration
management sy
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared
libraries an
ii  net-tools                   1.60-10      The NET-3 networking
toolkit

-- debconf information:
  ifupdown/convert-interfaces: true



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to