[clug] debian startup script + madwifi

Benjamin Polkinghorne ben at polk.id.au
Thu Dec 15 09:05:46 GMT 2005


Hello all,

I have just been enlightened to the wonders of debains awesome package 
management system and as such am using it on all my new boxen instead of 
slackware.  I'm kinda still a little confused about the rc script setup 
in debian, but I think I've grasped it well enough to setup an rc.local 
script that runs on boot.  the script is in /etc/inet.d (duh) and i have 
soft link to it in /etc/rc2.d called S89rc.local.  It only contains my 
madwifi commands atm but it doesn't work properly. default runlevel is 
2. (also runlevel 2 is loading gdm is there a console only runlevel on 
debian?)   script is as follows

#!/bin/bash
#wireless shit
modprobe ath_pci
sleep 5
wlanconfig ath0 create wlandev wifi0 wlanmode adhoc
sleep 1
iwconfig ath0 mode Ad-hoc "essid and wep key removed" channel 6
sleep 1
ifconfig ath0 192.168.5.3

these commands don't seem to get run, but the output of dmesg shows the 
wifi0 device getting setup before my realteck nic, is the kernel loading 
the madwifi driver somehow, or is it autoloading modules?  I added the 
sleeps in there incase it's taking to long to do the modprobe doesn't 
seem to make a differrence.  Something is loading the ath_pci and 
associated modules, beacause if I run the other commands manually the 
link comes up OK. 

Is this how one would setup an rc.local type script in debian?  It seems 
to work for other stuff, just not madwifi drivers.  Does anyone here use 
the madwifi and load it at boot time? 

Any help or a point to the relevent doco would be great.

Thanks,
Ben.

ps heres the dmesg output incase it's relevent


Linux version 2.6.813-12-2005 (root at whiskas) (gcc version 3.3.5 (Debian 
1:3.3.5-13)) #4 Tue Dec 13 21:44:28 EST 2005
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000000bff0000 (usable)
 BIOS-e820: 000000000bff0000 - 000000000bff3000 (ACPI NVS)
 BIOS-e820: 000000000bff3000 - 000000000c000000 (ACPI data)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
191MB LOWMEM available.
On node 0 totalpages: 49136
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 45040 pages, LIFO batch:10
  HighMem zone: 0 pages, LIFO batch:1
DMI 2.0 present.
ACPI disabled because your bios is from 99 and too old
You can enable it with acpi=force
Built 1 zonelists
Kernel command line: root=/dev/hda1 ro
Local APIC disabled by BIOS -- reenabling.
Found and enabled local APIC!
Initializing CPU#0
PID hash table entries: 1024 (order 10: 8192 bytes)
Detected 467.968 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 191312k/196544k available (1553k kernel code, 4604k reserved, 
839k data, 208k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 923.64 BogoMIPS
Security Scaffold v1.0.0 initialized
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 0183fbff 00000000 00000000 00000000
CPU: After vendor identify, caps:  0183fbff 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 128K
CPU: After all inits, caps:        0183fbff 00000000 00000000 00000040
CPU: Intel Celeron (Mendocino) stepping 05
Enabling fast FPU save and restore... done.
Checking 'hlt' instruction... OK.
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 467.0631 MHz.
..... host bus clock speed is 66.0804 MHz.
NET: Registered protocol family 16
EISA bus registered
PCI: PCI BIOS revision 2.10 entry at 0xfb1f0, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040326
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
PnPBIOS: Scanning system for PnP BIOS support...
PnPBIOS: Found PnP BIOS installation structure at 0xc00fbde0
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0xbe08, dseg 0xf0000
PnPBIOS: 14 nodes reported by PnP BIOS; 14 recorded by driver
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Using IRQ router PIIX/ICH [8086/7110] at 0000:00:07.0
PCI: IRQ 0 for device 0000:00:07.2 doesn't match PIRQ mask - try 
pci=usepirqmask
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
devfs: 2004-01-31 Richard Gooch (rgooch at atnf.csiro.au)
devfs: boot_options: 0x0
Initializing Cryptographic API
Limiting direct PCI/PCI transfers.
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Serial: 8250/16550 driver $Revision: 1.90 $ 54 ports, IRQ sharing enabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
orinoco.c 0.13e (David Gibson <hermes at gibson.dropbear.id.au> and others)
Loaded prism54 driver, version 1.2
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
hda: ST320413A, ATA DISK drive
hdb: AOPEN CD-RW CRW4048 1.05 20020605, ATAPI CD/DVD-ROM drive
Using anticipatory io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 128KiB
hda: 39102336 sectors (20020 MB) w/512KiB Cache, CHS=38792/16/63
 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 >
hdb: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
EISA: Probing bus 0 at eisa0
Cannot allocate resource for EISA slot 4
Cannot allocate resource for EISA slot 5
EISA: Detected 0 cards.
NET: Registered protocol family 2
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
NET: Registered protocol family 8
NET: Registered protocol family 20
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 208k freed
NET: Registered protocol family 1
Adding 562232k swap on /dev/hda5.  Priority:-1 extents:1
EXT3 FS on hda1, internal journal
Linux agpgart interface v0.100 (c) Dave Jones
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.16.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, 
RF5413, DFS)
wlan: 0.8.4.2 (Atheros/multi-bss)
ath_rate_sample: 1.2
ath_pci: 0.9.4.5 (Atheros/multi-bss)
PCI: Found IRQ 11 for device 0000:00:0e.0
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 
24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 7.9 phy 4.5 radio 5.6
wifi0: Use hw queue 1 for WME_AC_BE traffic
wifi0: Use hw queue 0 for WME_AC_BK traffic
wifi0: Use hw queue 2 for WME_AC_VI traffic
wifi0: Use hw queue 3 for WME_AC_VO traffic
wifi0: Use hw queue 8 for CAB traffic
wifi0: Use hw queue 9 for beacons
wifi0: Atheros 5212: mem=0xe7000000, irq=11
8139too Fast Ethernet driver 0.9.27
PCI: Found IRQ 10 for device 0000:00:0f.0
eth0: RealTek RTL8139 at 0xe400, 00:02:dd:50:5a:8c, IRQ 10
eth0:  Identified 8139 chip type 'RTL-8139C'
PIIX4: IDE controller at PCI slot 0000:00:07.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
PIIX4: port 0x01f0 already claimed by ide0
    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
PCI: IRQ 0 for device 0000:00:07.2 doesn't match PIRQ mask - try 
pci=usepirqmask
PCI: Assigned IRQ 9 for device 0000:00:07.2
uhci_hcd 0000:00:07.2: Intel Corp. 82371AB/EB/MB PIIX4 USB
uhci_hcd 0000:00:07.2: irq 9, io base 0000e000
uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
agpgart: Detected an Intel 440LX Chipset.
agpgart: Maximum main memory to use for agp memory: 149M
agpgart: AGP aperture is 16M @ 0xe5000000
cpci_hotplug: CompactPCI Hot Plug Core version: 0.2
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
pciehp: acpi_pciehprm:get_device PCI ROOT HID fail=0x1001
shpchp: acpi_shpchprm:get_device PCI ROOT HID fail=0x1001
8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)
Real Time Clock Driver v1.12
input: PC Speaker
inserting floppy driver for 2.6.813-12-2005
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 
[PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
NET: Registered protocol family 10
Disabled Privacy Extensions on device c03170e0(lo)
IPv6 over IPv4 tunneling driver
eth0: no IPv6 routers present



More information about the linux mailing list