Friday, June 11, 2010

suse, you and your mac addressed eth iface ifcfgs

i really get tried of those mac addresses.

#!/bin/sh
MAC=$(ifconfig | awk '/HWaddr / { print $NF }')
newMAC=`echo "${MAC}" | tr [:upper:] [:lower:]`
mv "/etc/sysconfig/network/ifcfg-eth-id-${newMAC}" "/etc/sysconfig/network/ifcfg-eth0" 

No comments: