FedoraThis forum is for the discussion of the Fedora Project.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The /etc/init.d/network script brings up every interface at boot. Sometimes this is nice because if I don't have a network cable plugged in, it will fail quicky and go on to the next interrace (wireless). But, if I do have a network cable plugged in, it brings that up along with the wireless connection and proceeds to use the wireless interface.
Is there a way to make this script stop when at the first successful network connection that it encounters? Thanks!
you can't stop at the first successful one no, that doesn't really make sense. i mean you could write yoru own script to try them in a certain order, but it's a pretty obtuse thing to want to do... you can certainly edit their config files to not make them run at boot on a per interface basis in /etc/sysconfig/network-scripts/ifcfg-<name> but not what you want, no.
Why doesn't it make sense? Why would you want to connect to a wireless router after you have already established a connection through a hard line? I wouldn't call this obtuse... it just doesn't make sense the way that they do it.
If you really want to do this might be 1 way to do it. Move out ifcfg-eth2(whatever the wireless connection is) into your home directory. This effectively will mean that your wireless connection wont come up at startup.
Put in a line in your .bash_history which copies the wireless config file into /etc/sysconfig/network-scripts while logging in. Since your services are already started up nothing's gonna happen .. as in your wireless isnt going to come up.Incase your wired connection goes down you can just copy the wireless file back into /etc/sysconfig/network-scripts/ and restart network services.
Now in your bash logout scripts just move the wireless config file back again into your home directory or something.All this has to be scripted obviously and its just a dirty hack so really why would you want to do this?
p.s...Best solution:Just turn off the wireless router once you're connected..
it's not that it literally doesn't make sense, it's that it's a very specific requirement for a specifc scenario, and you can only cater for so many scenario's. What i said above still stands though, it's really fiarly simple to script your own desired behaviour yourself as part of your own boot process. I should say at the same time that moving ifcfg-eth0 to your home directory is really not a good idea, and isn't worth looking at really. instead just edit the interfaces and set ONBOOT=no then start them in your preferred order. but past that, i don't think that you even necessarily have a problem. so what if both networks are connected to? what's the problem with that? should work just fine as far as i'm aware. if you wish to use the wired conenction instead of the wireless if they are both available, i *THINK* you can just set a different metric in each ifcfg file, e.g "METRIC-1" for the wired one and "METRIC=10" in the wireless. that way if they are both connected the wired connection will be used exclusively as it has a lower metric.
so what if both networks are connected to? what's the problem with that? should work just fine as far as i'm aware.
Yes, it does work in the sense that I do get an IP address and that I can use the Internet. The problem is that the laptop interfaces using a local IP address given by a router that isn't mine. So, yes this is specific, and I understand that, but I figured I would clarify that it can be a problem.
Also, thanks to everyone for the answers, I appreciate it!