mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
init: add fix for RPi4 serial numbers
This commit is contained in:
parent
c44ba726c2
commit
993ac53944
@ -48,7 +48,7 @@ BREAK_TRIPPED="no"
|
||||
BIGFONT="1080"
|
||||
|
||||
# Get a serial number if present (eg. RPi) otherwise use MAC address from eth0
|
||||
MACHINE_UID="$(cat /proc/cpuinfo | awk '/^Serial/{s=$3; gsub ("^0*","",s); print s}')"
|
||||
MACHINE_UID="$(awk '/^Serial/{s='0000000' $3; print substr(s, length(s) - 7)}' /proc/cpuinfo)"
|
||||
[ -z "$MACHINE_UID" ] && MACHINE_UID="$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d :)"
|
||||
|
||||
# common functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user