#!/bin/sh ### BEGIN INIT INFO # Provides: builds ifcfg file for eth0 dhcp interface # Required-Start: $haldaemon # Required-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 6 # Description: Configure eth0 /etc/sysconfig/network/ file ### END INIT INFO IFMAC=`egrep eth0 /etc/udev/rules.d/70-persistent-net.rules | awk '{print $4 }' | cut -f2 -d '"' ` echo $IFMAC FILENAME="/etc/sysconfig/network/ifcfg-eth-id-"${IFMAC} BLANKENTRY="/etc/sysconfig/network/ifcfg-eth-id-" if [ -f $BLANKENTRY ] then rm $BLANKENTRY fi echo $FILENAME if [ -f $FILENAME ] then ##rm $FILENAME echo "networking set up" exit fi touch $FILENAME cat > $FILENAME < $FILENAME <