Re: Logic for network-scripts?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joe Christy <joe@xxxxxxxx> writes:

>   Vis-a-vis Harry Putnam's note of 08/16/2004 08:09 AM:
>> ...
>> Not really what you asked for... that is no test involved but would
>> setting the ONBOOT parameter on one or the other to `NO' help?
>> ...
>
> 	Thanks, but you're right, that's not quite what I had in mind. If I'm 
> in the situation where the interface I need has ONBOOT unset, then when 
> I boot,  many subsequent network services, e.g. ntpdate, NFS mounts, 
> etc. fail and need to be started by hand, which is what I'd like to avoid.

First WARNING UNTESTED!!!

(I've done similar things but not this exactly so beware)

Set the ethernet device ONBOOT=NO

The scripts in /etc/rc.d/ have prefixes like S56blah which tell that
script when to fire (inside a run level) The S means start and the
number is a timing code.

Find the one that starts the wireless.  I'm guessing it might be:
/etc/rc.d/rc3.d/10network

And insert your own script S17myscript  (I haven't researched
exactly what the numbers mean so maybe something else here).  I think
that would place it after syslog had started so any problems might at
least get logged.

Your script could test for connectivity in an if/else thingy with a
simple ping (ping -c1 <HOST>) possibly, to a known (normally up) host.

if it succedes your script runs ifup <device> else exit.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux