Please support VectorLinux!

Author Topic: Start network on bootup (solved)  (Read 2838 times)

InTheWoods

  • Vectorite
  • ***
  • Posts: 302
Start network on bootup (solved)
« on: June 14, 2007, 01:17:58 pm »
I recently had to reinstall Vec 5.8 Standard and cannot remember how to enable automatic network startup on system start. The network is working, I'm using ndiswrapper for the wireless card and wep encryption.

I had this problem solved before but that post is presently missing.

« Last Edit: June 14, 2007, 02:17:41 pm by InTheWoods »

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: Start network on bootup
« Reply #1 on: June 14, 2007, 01:25:01 pm »
Yeah, there are lots of useful posts missing atm.
Anyway, all you have to do is add the commands you would normally use to connect to your network to the end of /etc/rc.d/rc.local
For example, this is what I have in my rc.local to autoconnect to my network:

Code: [Select]
echoc "Attempting to start wireless network for 20 seconds..." green
iwconfig wlan0 key 31652f254b
iwconfig wlan0 ap Auto

#Give enough time to let iwconfig autodetect the wireless AP
sleep 1

dhcpcd -d wlan0 -t 20

HTH  :)

InTheWoods

  • Vectorite
  • ***
  • Posts: 302
Re: Start network on bootup
« Reply #2 on: June 14, 2007, 02:17:20 pm »

Got it!

Thanks!

vlinco

  • Member
  • *
  • Posts: 12
Re: Start network on bootup (solved)
« Reply #3 on: March 28, 2010, 11:08:25 am »
I just installed VL 6.0 Light, and found that the wireless network would not start automatically at boot. I also found that in my case the code from easuter wouldn't work without a few changes. For anyone else who might be in the same shoes, here's the code that worked for me:

#-- Auto connect to wireless network
echo "Attempting to start wireless network for 20 seconds..." green
iwconfig wlan0 essid MyRouterName key XXXXXXXXXX mode Managed ap auto

#Give enough time to let iwconfig autodetect the wireless AP
sleep 1

#Get ip address from DHCP server
dhcpcd -d wlan0 -t 20

#Start up connection
ifconfig wlan0 up



Note - The essid & key are fictitious fillers. Fill in your essid and key.

brampieke

  • Member
  • *
  • Posts: 34
Re: Start network on bootup (solved)
« Reply #4 on: June 06, 2010, 01:02:15 am »
I'm also using VL 6.0 light.
Do I need to fill this in ~/.icewm/startup ??

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4072
Re: Start network on bootup (solved)
« Reply #5 on: June 06, 2010, 04:54:28 am »
These commands need to be run as root, so the Icewm startup script won't do. Put them in /etc/rc.d/rc.local.

For a GUI app that a normal user can control, install and use wicd.