#!/bin/sh
# Create configuration files for ethernet devices, for using DHCP

# Maximum ethernet interfaces in systems:
i=9

# Config file name
if="ifcfg-eth"

# Path to config files:
path=/etc/sysconfig/network-scripts/

# Create new config files:
while ((--i >= 0)) ; do
    
    cat <<__EOF__ > $path/$if$i
DEVICE=eth$i
BOOTPROTO=dhcp
__EOF__

chmod 755 $path/$if$i
done
