[lxc-devel] hwaddr tuning in templates

Guillaume ZITTA lxc at zitta.fr
Tue Dec 24 14:01:38 UTC 2013


Hi,

I'm coding a new template (for gentoo).

I saw this kind of tweak in many templates :

     if [ "$nics" -eq 1 ] && ! grep -q "^lxc.network.hwaddr" 
$path/config; then
         # see 
http://sourceforge.net/tracker/?func=detail&aid=3411497&group_id=163076&atid=826303
         hwaddr="fe:$(dd if=/dev/urandom bs=8 count=1 2>/dev/null |od -t 
x8 | \
                       head -1 |awk '{print $2}' | cut -c1-10 |\
                       sed 's/\(..\)/\1:/g; s/.$//')"
         echo "lxc.network.hwaddr = $hwaddr" >> $path/config
     fi

The url no longer exists and I didn't catch the explaination in ML 
archive.

Someone has a new pointer to the explaination?
Was it a workaround for a no longuer existing bug?

Regards,

Guillaume ZITTA



More information about the lxc-devel mailing list