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

Re: interfaces(5): mapping



Dmitry A. Fedorov -> debian-russian@lists.debian.org  @ Sat, 31 Jan 2004 21:40:23 +0600:

 DAF> В interfaces(5) говорится о возможности отображения физических имен
 DAF> интерфейсов на логические:

 DAF> mapping eth0
 DAF>             script /usr/local/sbin/map-scheme
 DAF>             map HOME eth0-home
 DAF>             map WORK eth0-work

 DAF> но рассказывается об этом крайне мало:

 DAF> Stanzas beginning with the word "mapping" are used to automatically
 DAF> translate a physical interface name into a logical interface specified
 DAF> by an "iface"  stanza. The first line of a mapping stanza begins with
 DAF> the word "mapping" followed by the names of each physical interface this
 DAF> mapping should apply to. Shell globs (* and ? wildcards)  may be used
 DAF> when specifying interfaces. Each mapping must specify a script, which
 DAF> will be run when the mapping is applied. In addition, a mapping may
 DAF> specify any number of "map" parameters that will be passed to the
 DAF> script.


 DAF> Может кто-нибудь объяснит, _что_ и как должен делать скрипт?
 DAF> О передаваемых ему параметрах я уж и не говорю, это я еще могу
 DAF> выяснить, но вот все остальное... мне сейчас проще драйверы патчить,
 DAF> чтобы правильные и однообразные имена получить.

Посмотри в examples.  Прочесть сами скрипты быстрее, чем я тебе буду
рассказывать.  В общих чертах - вывести в stdout то название (последнее
слово в строке map), которое соответствует текущей сети.  Откуда он его
возьмет - его интимные подробности.  В принципе, может даже с юзером
поинтерактиться.  Через /dev/tty, разумеется.

-- 
Artem Chuprina
RFC2822: <ran@ran.pp.ru>, FIDO: 2:5020/122.256, ICQ: 13038757



Reply to: