mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
init: add fix for RPi4 serial numbers
This commit is contained in:
parent
a33f204304
commit
766cfd33a2
@ -48,7 +48,7 @@ BREAK_TRIPPED="no"
|
|||||||
BIGFONT="1080"
|
BIGFONT="1080"
|
||||||
|
|
||||||
# Get a serial number if present (eg. RPi) otherwise use MAC address from eth0
|
# 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 :)"
|
[ -z "$MACHINE_UID" ] && MACHINE_UID="$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d :)"
|
||||||
|
|
||||||
# common functions
|
# common functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user