Here is another possible option based on a similar solution by @bigsmile
You could modify that solution to look like this:
#!/bin/sh
random_mac(){ printf "%02x" $(( 0x$(hexdump -n6 -ve '/1 "%02X"' /dev/urandom) & 0xFF )) | sed 's/../:&/g;s/^://';}
uci set network.wan.macaddr 11:22:33:44:55:$(random_mac)
uci commit
With the modification shown above, the 11.22.33.44.55: are fixed ( substitute those numbers with whatever base MAC you want) and the $(random_mac) is the variable of the random two characters for the last octet.
The random characters are generated from the printf "%02x"
The "2x" part is telling it the number of characters to generate.
You may want to consider making more than one octet random though. I would recommend having the first 3 octets fixed, and the last 3 random. That would look like this:
#!/bin/sh
random_mac(){ printf "%06x" $(( 0x$(hexdump -n6 -ve '/1 "%02X"' /dev/urandom) & 0xFFFFFF )) | sed 's/../:&/g;s/^://';}
uci set network.wan.macaddr 11:22:33:$(random_mac)
uci commit