Author Topic: Edgy Eft, Upstart, And Usbnet?  (Read 5968 times)

doug-taylor

  • Newbie
  • *
  • Posts: 22
    • View Profile
Edgy Eft, Upstart, And Usbnet?
« on: October 30, 2006, 09:30:23 am »
Hi.  I have a Zaurus SL-5500 running Opie 3.5.4, and I have been happily using the following script (/etc/hotplug/usb/usbnet) on my Ubuntu desktop to set up USB networking whenever my Z gets plugged in to the USB port:

#! /bin/bash
typeset -i num
num=`ifconfig | grep usb0 | wc -l`
if [ $num -eq 0 ] ; then
        ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
        route add -host 192.168.129.201 usb0
fi
iptables  -t nat -F
iptables  -t nat -A POSTROUTING -j SNAT -o eth0 --to <IP ADDRESS>
echo 1 > /proc/sys/net/ipv4/ip_forward

I recently upgraded Ubuntu from Dapper Drake to Edgy Eft, and all of a sudden, there's no /etc/hotplug directory.  It looks like that functionality has been taken over by upstart.  So my question is, how can I set up upstart (1) to recognize that the Z has plugged into the USB port and (2) to set up networking for it?

Thanks,

Doug

Ling

  • Sr. Member
  • ****
  • Posts: 350
    • View Profile
    • http://
Edgy Eft, Upstart, And Usbnet?
« Reply #1 on: December 31, 2006, 12:29:09 am »
I believe that hotplug was replaced with udev. Looking at my Edgy box (upgraded from Dapper) I still have an /etc/hotplug directory, but the /etc/udev/ directory seems to have the current information. If you haven't already done so, I would post your question at the ubuntu/kubuntu forum. If I have time tomorrow, I will try your script with my 3200. Thanks.
SL-C3200 w/ pdaXii13 5.3
SL-C860 w/ OZ GPE 3.4.1
Accessories: 4GB Microdrive, 4GB Transcend SD, Linksys WFC12 CF 802.11b, Ambicom CF Modem, Socket Bluetooth