Граждане, обясните мне пожайуста почему:
$ /etc/network/map-scheme wifi
YANKA
$ sudo ifup -v wifi
Running mapping script /etc/network/map-scheme on wifi
Ignoring unknown interface wifi=YANKA.
$

всё сделал как в мане написано.. имхо. или я чего-то не понимаю..

--
Sergio.
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo
iface lo inet loopback

#iface eth-school inet static
#       address                 192.168.215.147
#       netmask                 255.255.255.0
#       gateway                 192.168.215.1

iface eth inet dhcp

iface firewire inet dhcp

mapping wifi
        script /etc/network/map-scheme
        map     HOME    wifi-home
        map     YANKA   wifi-yanka
        map     qwe     wifi-yanka

iface wifi-home inet dhcp
        wireless_essid          sergio's home
        wpa-driver              wext
        wpa-conf                /etc/wpa_supplicant.conf
        wireless_channel        4

iface wifi-yanka inet static
        wireless-mode           managed
        wireless-essid          yanka's home
        wireless-channel        11
        address                 192.168.1.2
        netmask                 255.255.255.0
        gateway                 192.168.1.1
#!/bin/bash

iface=$1
result=""

if [ "$(/sbin/iwlist $iface scan | grep ESSID | grep "ESSID:\"yanka's home\"")" 
]; then
        result="YANKA";
elif [ "$(/sbin/iwlist $iface scan | grep ESSID | grep "ESSID:\"sergio's 
home\"")" ]; then
        result="HOME";
fi
if [ "$result" ]; then
        echo "$result";
        exit 0;
fi
exit 1

Ответить