View previous topic :: View next topic |
Author |
Message |
pygoscelis Guru

Joined: 07 Jun 2003 Posts: 409
|
Posted: Sun Nov 07, 2010 8:30 am Post subject: Bring usb0 up automatically [SOLVED] |
|
|
Hi everyone. I have a 3G cell phone which I use tethered as a USB network adapter. It works, but I have to bring it up manually each time it's plugged in:
Code: | sudo ifconfig usb0 up
sudo dhcpcd usb0
|
Sometimes dhcpcd doesn't work because there's an old instance of dhcpcd running on usb0. Sometimes in this case dhcpcd -n works, sometimes it does not and I have to kill the old instance.
What is the accepted way to do all this automatically? Do I need to create something like /etc/init.d/net.usb0 or something else? If it's etc/init.d/net.usb0, what do I put inside?
I'm not using NetworkManager.
UPD: heh, it always helps to look around a little.
What one needs to do is:
Code: | sudo emerge ifplugd
cd /etc/init.d
sudo ln -s net.lo net.usb0
|
Magic! |
|
Back to top |
|
 |
chithanh Developer


Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Sun Nov 07, 2010 11:50 am Post subject: |
|
|
ifplugd is totally not necessary. If /etc/init.d/net.usb0 exists then udev will launch it automatically as soon as you plug in the USB network device. |
|
Back to top |
|
 |
pygoscelis Guru

Joined: 07 Jun 2003 Posts: 409
|
Posted: Sun Nov 07, 2010 4:37 pm Post subject: |
|
|
chithanh wrote: | ifplugd is totally not necessary. If /etc/init.d/net.usb0 exists then udev will launch it automatically as soon as you plug in the USB network device. |
I tried without ifplugd and it didn't work. Maybe I just didn't have patience to wait for udev picking it up. Next time I'll try again. |
|
Back to top |
|
 |
|