From e30ab8abba69506ac8cfac179da615613b866d91 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Wed, 27 May 2015 14:50:06 +0100 Subject: [PATCH] Reduce obfuscation --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 6fc353a2..7ee26627 100755 --- a/weave +++ b/weave @@ -237,7 +237,7 @@ random_mac() { # In the first byte of the MAC, the 'multicast' bit should be # clear and 'locally administered' bit should be set. All other # bits should be random. - od -txC -An -N6 /dev/urandom | sed 's|^ ||;s| |:|;s|[0-3]:|2:|;s|[4-7]:|6:|;s|[89ab]:|a:|;s|[c-f]:|e:|;s| |:|g' + od -txC -An -N6 /dev/urandom | ( read a b c d e f && printf "%02x:$b:$c:$d:$e:$f" $((0x$a & ~1 | 2)) ) } ######################################################################