#!/bin/bash
PTT_HWADDR=$1
if [ "x$PTT_HWADDR" = "x" ]; then
	. ~/.config/ptt.d/pttchgmac.conf
fi
if [ "x$PTT_HWADDR" = "x" ]; then
	die "tell me a mac address to use!"
fi
ifdown eth2:auto eth2
ifdown --force eth2:auto eth2
ifdown --force eth2
ifconfig eth2 down
sleep 1
ifconfig eth2 down
ifconfig eth2 hw ether  $PTT_HWADDR
ifup eth2
ifconfig | grep ether

