[NCLUG] RH networking scripts

Mark Fassler fassler at monkeysoft.net
Sun Oct 28 22:14:31 MST 2001


On Sun, Oct 28, 2001 at 09:44:41PM -0700, S. Luke Jones wrote:
> Those of you who use Red Hat for serious systems -- I mean,
> commercial and enterprise customers of RH and its derivatives,
> as distict from bottom-feeding home workstation types like me.
> Do you use the networking scripts that RH supplies? And if not,
> what procedure do you use to avoid them?

I have a couple machines that are web or email or DNS servers and the 
like.  For these, I use the default RH scripts.  They work for 99% of the 
situations that I run into, as far as I'm concerned (except firewalling).  

> I wonder, because I've come to the conclusion that they're
> beyond redemption. The theory appears to be that the scripts
> let everything plug into the /etc/rc.d/init.d infrastructure
> so networking's complexities (physical layer, etc.) are all
> abstracted away.
> 
> A noble goal, to be sure, but poorly excuted, IMHO. The net
> result is to change one file with a dozen or two "ifconfig",
> "route", and "ifwadm" / "ipchains" / "iptables" commands with
> several hundred lines of bash scripts.

I try to avoid changing the scripts themselves:  this only invites more 
work (and more chance for error) in the long run.  

I put custom stuff (ie, firewalling rules) in /sbin/ifup-local.  The 
RedHat scripts will call this file automagically without any changes.  

All the other changes, I do in the normal places 
(/etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network).  
Again, I consider it to be bad mojo to change any of the scripts 
themselves -- it's more work in the long run.  

I don't see RH networking scripts as being poorly executed - it's a 
question of your paradigm:  with OpenBSD, the idea is that you go in and 
change the script to do what you want, in RH, you change only the config 
files to do what you want.  If you take the BSD paradigm into RH, you'll 
hate it, and vice-versa.

There are only two things that RH networking scripts don't do to my 
satisfaction:  firewalling and "elaborate" routes.  For this, as I said, I 
put everything into /sbin/ifup-local - RH will automatically call this 
file when an interface is started.  
 
> (And not the best quality bash scripts, if you ask me. I don't
> see why [ -f file ] && { foo ; bar ; baz; } is so much more
> readable than if [ -f file ] ; then foo; bar; baz ; fi. 

I think the idea is that the former executes slightly faster than the 
latter.  

(I do have a weird situation involving some workstations and DHCP where I 
had to change the scripts, but that's kind of an odd situation.)

--
Mark Fassler
fassler at monkeysoft.net



More information about the NCLUG mailing list