mac address

This commit is contained in:
Bob Mottram 2015-07-27 08:29:13 +01:00
parent 2b2e943a6a
commit 40b78a0f39
1 changed files with 2 additions and 1 deletions

View File

@ -225,7 +225,8 @@ a=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
b=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
c=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
d=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
$SUDO sed -i "s|#hwaddress ether.*|hwaddress ether DE:AD:$a:$b:$c:$d|g" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
e=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
$SUDO sed -i "s|#hwaddress ether.*|hwaddress ether de:$a:$b:$c:$d:$e|g" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
$SUDO sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
$SUDO sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf