Author Topic: Hotplug issue Slackware 10  (Read 4549 times)

uberjoe

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Hotplug issue Slackware 10
« on: September 29, 2004, 02:33:35 pm »
I'm trying to get hotplug to setup my usb0 interface when I put the z in the cradle. I put this script
Quote
#! /bin/bash
typeset -i num
num=`ifconfig | grep usb0 | wc -l`
if [ $num -eq 0 ] ; then
ifconfig usb0 192.168.129.200 netmask 255.255.255.255 up
route add -host 192.168.129.201 usb0
fi

in /etc/hotplug/usb and called it usbdnet and usbnet, neither one worked. If I run the commands in the script manually as root, I am successful, but the script itself does not seem to work for me. Here is my relevent info
Quote
pc: 192.168.129.200 mask 255.255.255.255 route 192.168.129.201
z: 192.168.129.201 mask 255.255.255.0 route 192.168.129.200

The script is in /etc/hotplug/usb and my user's group has permission to execute it. Any thoughts on how to get this working?
SL-5500 hentges rom 3.5.2 w/cardfs and opie 1.1.8
Belkin IR keyboard
64mb cf card
256 sd card
Spectrum24 cf wi-fi card

uberjoe

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Hotplug issue Slackware 10
« Reply #1 on: February 21, 2005, 06:14:14 pm »
*bump*
SL-5500 hentges rom 3.5.2 w/cardfs and opie 1.1.8
Belkin IR keyboard
64mb cf card
256 sd card
Spectrum24 cf wi-fi card

Howitzer

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://
Hotplug issue Slackware 10
« Reply #2 on: April 21, 2005, 12:55:36 am »
This may be relevant despite my gettting this working in CentOS 4.

I had to change the ifconfig and route lines to:

/sbin/ifconfig
/sbin/route

and the filename had to be usbnet, not usbdnet.