Difference between revisions of "USBNET Udev Rule"
Jump to navigation
Jump to search
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...) |
PuffTheMagic (talk | contribs) |
||
Line 1: | Line 1: | ||
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. | 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 | + | Create a file in /etc/udev/rules.d (ex. 01-palmpre.rules) and put the following line in it. You can set the IP address to what ever you want or even call dhcpcd instead of ifconfig. |
<code> | <code> | ||
− | KERNEL=="usb*", | + | KERNEL=="usb*", ATTRS{product}=="Pre", NAME="pre", RUN+="/sbin/ifconfig pre 192.168.0.200" |
</code> | </code> |
Latest revision as of 21:45, 28 November 2009
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. You can set the IP address to what ever you want or even call dhcpcd instead of ifconfig.
KERNEL=="usb*", ATTRS{product}=="Pre", NAME="pre", RUN+="/sbin/ifconfig pre 192.168.0.200"