LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] bloody redhat network init scripts (and regex's)

[ILUG] bloody redhat network init scripts (and regex's)

Kevin O Riordan koriordan at compsoc.com
Tue Jul 10 10:24:05 IST 2001


On Setting Orange, the 44th day of Confusion, Paul Jakma claimed:
 
> >   if [ -n "$ORDERED_INTERFACES" ]; then
> >     for i in $ORDERED_INTERFACES; do
> >       action "Bringing up interface $i, in order " ./ifup $i boot
> >     done
> >     for i in $interfaces; do
> >         if echo "$ORDERED_INTERFACES" | grep -v "$i" >/dev/null 2>&1 ; then
> >           action "Bringing up interface $i " ./ifup $i boot
> 
> what if the interface is already up? that's what my nested for is
> 'for'. or does ifup handle that gracefully?

The if...echo...grep line should make sure that anything in
ORDERED_INTERFACES isn't brought up again.  There's no reason why
any of these devices should be up anyways, the script would only
be run at boot or changing runlevels, methinks.
 
ifup exits successfully if the device was already up, or so it would
seem from here.  Could you send over your ifup ?  This is (nominally)
an RH 6.1 box, and I don't think the network scripts were ever 
upgraded or modified - it is possible that newer ones might behave
differently I guess.


> > (proposed) $ORDERED_INTERFACES variable would instinctively check the
> > relevant ifcfg- file as part of investigating an ifup failure.
> 
> indeed.

If no argument is given to ifup, or if a ifcfg- file is not found, the
same error message is given.  This seems silly, as they wrote the same
error message twice into the script.

-kev

-- 
rabbits, shoot can shoot I can fascists if I




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell