Friday, January 10, 2003

This bit of information on making Debian clear the screen on a logout was extreemly helpful. Basically, use "mingetty" in /etc/inittab instead of "getty 38400" for the consoles.


12:46:26 PM  #  

This is just here to help me figure out how to do some wireless stuff in Linux


Configuring Wireless on the laptop in Debian 3.0

DEBIAN 3.0 (and later)
(Contributed by Guus Sliepen )

Debian also has another way of configuring network devices, controlled by /etc/network/interfaces. Users can add a wireless interface to /etc/network/interfaces, using the standard options to set the address and such, but the wireless-tools package adds new option statements that can be used to configure keys, channel, etcetera.

From the README.Debian script that comes with wireless-tools:



/etc/network/interfaces -----------------------

You can now add extra statements to the iface sections of the files in /etc/network/interfaces that are specific for wireless interfaces. They are of the form:

wireless_[function] [value]

Before the interface is brought up, such a statement will result in the execution of the following command:

iwconfig [interface] [function] [value]

Example:

iface eth0 inet static
    address 192.168.1.2
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    wireless_essid Home
    wireless_mode ad_hoc

The current Debian script support all arguments present in wireless.opts apart from Nickname. You can check this in the script /etc/network/if-pre-up.d/wireless-tool.

You will need of course to install the Wireless Tools package if it's not already done, which is part of the standard package list (use dselect, dpkg, apt or anything you like to get it).


(Contributed by Joey Hess )

/etc/network/interfaces is much more flexible than it appears. It can probably do everything pcmcia schemes can do, and more. Here is part of mine:

auto wlan0
mapping wlan0
        script /usr/local/bin/ifscheme

iface wlan0-home inet static address 192.168.1.5 gateway 192.168.1.1 netmask 255.255.255.0 wireless_mode ad_hoc wireless_essid wortroot wireless_nick dragon wireless_channel 1

iface wlan0-away inet dhcp wireless_mode managed

Now I can type 'ifscheme -s away' when I leave home, rather like cardctl scheme.

The ifscheme script is at http://bugs.debian.org/154444. If the request in bug #154442 is implemented, it will become very flexible indeed..

Debian will hopefully be using this same file eventually for pcmcia network devices too. It's already doable but takes a little work. This is all rather rough and badly documented so far.

You can also do mapping based on the MAC address, if you want specific configuration on specific card. See /usr/share/doc/ifupdown/examples/get-mac-address.sh and the stanza in /usr/share/doc/ifupdown/examples/network-interfaces.gz that uses it. This comes back to the problem I alluded to with mapping scripts not being "nestable" yet, and bug #154442. You can do what you want today, but you may need to write your own mapping script which uses a combination of MAC address and scheme info to return a stanza name to ifupdown.


Finally, there is a link for the wireless diagnostic tools


10:50:19 AM  #