USBNET Udev Rule

From WebOS Internals
Revision as of 20:01, 28 November 2009 by PuffTheMagic (talk | contribs) (New page: If you use usbnet often to ssh into your Pre you probably are sick of assigning it an IP address every time you plug it in. By using a simple udev rule you can assign a static IP address a...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

If you use usbnet often to ssh into your Pre you probably are sick of assigning it an IP address every time you plug it in. By using a simple udev rule you can assign a static IP address as soon as it is plugged in.

Create a file in /etc/udev/rules.d (ex. 01-palmpre.rules) and put the following line in it (obviously changing the mac address appropriately).

KERNEL=="usb*", ATTR{address}=="d6:4b:6b:0c:a7:65", NAME="pre", RUN+="/sbin/ifconfig pre 192.168.0.200"