The task: generate random mac when an interfaces comes up.
#this does work to generate a random mac
echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g'
the inside of /etc/network/interfaces:
auto eth0
iface eth0 inet dhcp
#This works:
hw-mac-address aa:bb:cc:dd:ee:ff
#while this does not when I ifup eth0:
hw-mac-address $(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g')
Any thoughts or suggestions?