From 585967c5ed3fd3b5ae49c303cfada9f96b5b3c51 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Thu, 26 Apr 2018 16:46:18 -0400 Subject: Notes about generating a random macaddr on FreeBSD --- mkshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkshrc b/mkshrc index 02bfedb..2aac943 100644 --- a/mkshrc +++ b/mkshrc @@ -212,6 +212,9 @@ set_retro() { export TERM="$(echo $TERM | sed -e's/-256color$//')" } randmacgen() { + # This seems to be needed on FreeBSD, I'll have to look into + # exactly what is causing this and what the differences are + LC_COLLATE=c tr -c -d '0123456789abcdef' < /dev/urandom \ | head -c 12 \ | sed 's!^M$!!;s!\-!!g;s!\.!!g;s!\(..\)!\1:!g;s!:$!!' -- cgit v1.2.3