Skip to content
This repository was archived by the owner on Oct 27, 2018. It is now read-only.

Commit eefe67d

Browse files
committed
cubietruck: use the ethernet mac address in place of a serial number
1 parent 3cb02cc commit eefe67d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

board/cubietruck/overlay/etc/init.d/S00hostname

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
start() {
44
echo -n "Setting hostname: "
55

6-
sn="cubietruck"
6+
sn=$(cat /sys/class/net/eth0/address | tr -d ':')
7+
sn=${sn: -8}
78
echo $sn > /var/cache/serial_number
89
hostname="mp-$sn"
910
/bin/hostname $hostname

0 commit comments

Comments
 (0)