#!/bin/sh

if [ -f /etc/enigma2/hwmac ]; then
	macadr=`cat /etc/enigma2/hwmac`
	if [  "$macadr" != "" ];then
		route=`route -n |grep UG | awk '{print $2}'`
		ifconfig eth0 down
		ifconfig eth0 hw ether $macadr up
		route add default gw $route eth0
	fi
fi
