LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-24-2014, 12:30 PM   #1
seabro
LQ Newbie
 
Registered: Jan 2010
Posts: 26

Rep: Reputation: 0
Wi-fi Setup


Hi,

Centos 6.5

I eventually got Wifi working, but when I restart, it doesn't work until I run:

wpa_supplicant -d wext -i wlan0 -c /etc/wpa_supplicant.conf -B

Then I do a service network restart.

So I made a file that says

wpa_supplicant -d wext -i wlan0 -c /etc/wpa_supplicant.conf -B
service network restart

Then I chmod +x on it. How can I run it automatically when the system restarts?

If there is a better way of achieving what I want to achieve, please do let me know.

Thanks!!!

ps. I also did chkconfig 'wpa_supplicant on' but wi-fi still doesn't work after restart unless I do the commands above.

Last edited by seabro; 08-24-2014 at 12:32 PM.
 
Old 08-24-2014, 02:13 PM   #2
yooy
Senior Member
 
Registered: Dec 2009
Posts: 1,387

Rep: Reputation: 174Reputation: 174
Quote:
How can I run it automatically when the system restarts?
that may depend on your distro and desktop environment. try searching online based on that.

edit:sorry i didn't notice that you are on centos.

Last edited by yooy; 08-25-2014 at 06:16 AM.
 
Old 08-24-2014, 02:21 PM   #3
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
In RHEL 6/CentOS 6, if you are using NetworkManager (and you likely are), you need to be sure that "Connect Automatically" is checked in the adapter's setting applet.
 
Old 08-25-2014, 10:26 AM   #4
seabro
LQ Newbie
 
Registered: Jan 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GaWdLy View Post
In RHEL 6/CentOS 6, if you are using NetworkManager (and you likely are), you need to be sure that "Connect Automatically" is checked in the adapter's setting applet.
thanks for the responses people. I am in non-graphical mode so I assume I won't see an applet?

I just need a bash script to run at boot time but the contents of /etc/rc.d/init.d confused me. Whats the easiest way to run my script automatically?
 
Old 08-25-2014, 10:29 AM   #5
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
No, you do not need a script for this. If it's just not coming up after boot, be sure that /etc/sysconfig/network-script/ifconfig-[devname] contains the flag 'ONBOOT=yes'. The device should come up without needing to be initialized by hand.
 
Old 08-25-2014, 10:37 AM   #6
seabro
LQ Newbie
 
Registered: Jan 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Oops I found out how to do it. I put the command in /etc/rc.local

Thanks all the same people.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on setup of fedora 20 as a router from nic setup to firewalld setup Brian1 Linux - Networking 4 07-02-2014 09:53 PM
setup for official Laptop. (Admin setup in server and user account setup in lap) vignesh4sh Linux - Server 3 11-26-2012 08:03 AM
LXer: GDM2 Setup 0.3.6 released! Help you to get back the older GDM setup utility's LXer Syndicated Linux News 0 02-23-2010 08:50 PM
Slackware 12.0 setup cannot find linux partitions to install too after fdisk setup . TDurden1937 Slackware - Installation 1 10-25-2008 09:18 PM
[SUSE 9.1 PROF] How can I copy the setup files to my harddisk and start the setup? TheRealFalcon Linux - Distributions 1 08-08-2004 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration