Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey,
I have a wireless card and every time i startup I have to log in to root and type in the following:
wlanconfig ath0 create wlandev wifi0 wlanmode sta
iwconfig ath0 essid ANY
ifconfig ath0 up
dhclient
I made a script to do it, so it's a little easier. Is there any way I can get those commands to run at start up? One catch is that I have to be logged in as root to run those commands. Thanks for any help.
well, you didnt way your distrobution, but there is usually a file called rc.local in /etc/rc.d, all you have to do is add those lines to it, and it will run on boot. you may want to give a timeout factor to the dhcp client. you will have to man your dhcp client though. this way, it doesnt sit there and sit there for a minute or so when you boot. just set it for 10 seconds or so, then if that doesnt work, you can get one manually. with dhcpcd it is the -t option, so on my system i have
dhcpcd -d -t 10 eth1
the -d option just makes it print my mac and ip address if it gets one. i dont know how it is with dhclient, but im sure there are plenty of options that will do the same thing. but if there isnt a timeout option, somewhere somehow, i would suggest getting dhcpcd. cause rc.local will run and complete before you can login, so you dont want to be siting there if you take you laptop somewhere away from the AP, or into another network where you need different options. good luck.
if there isnt an rc.local, post back, we'll figure it out. make sure to give your distro though.
I stuck those lines in the rc.local file, but it didn't work right. After it ran them in rc.local, I tried to manually type them in again, and I couldn't get it to work. I had to reboot w/ the original rc.local. I could not find a timeout or a pause option for the dhclient command. I don't have dhcpcd, but I'm going to download it right now and try it.
I have a wireless card and every time i startup I have to log in to root and type
You probably have "ifup(devicename)" scripts for that in /etc/sysconfig/network-scripts, which will work with config files in /etc/sysconfig/networking/profiles/(profilename) if you have those. If you configure your device right the /etc/rc.(runlevel)d/network service will bring the device up.
*BTW, you better put WiFI questions in Forums > Networking > Wireless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.