should redirect the error/warning output so that it isn't mashed into the command:
openssl rand -hex 6 2>/dev/null | sed 's/\(..\)/\1:/g; s/.$//'
because if you are running this on startup there is a chance HOME or RANDFILE aren't set yet, the .rnd file doesn't exist or the permissions on it are not set properly - resulting in a warning such as "PRNG not seeded" or "unable to write 'random state'" that would be passed into the ifconfig command.