From a68b5d446ed22f4486cc46cb58a93d0ae66124f1 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Fri, 15 Nov 2024 14:08:09 +0100 Subject: [PATCH] functions: fix hwid for multiple nic Signed-off-by: AuxXxilium --- files/initrd/opt/arc/include/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/initrd/opt/arc/include/functions.sh b/files/initrd/opt/arc/include/functions.sh index b9eb62c2..d77149c9 100755 --- a/files/initrd/opt/arc/include/functions.sh +++ b/files/initrd/opt/arc/include/functions.sh @@ -565,6 +565,6 @@ function systemCheck () { ############################################################################### # Generate HardwareID function genHWID () { - HWID="$(echo $(dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g' | head -1) $(ifconfig | grep eth0 | awk '{print $NF}' | sed 's/://g') | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null + HWID="$(echo $(dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g' | head -1) $(ifconfig | grep eth | awk '{print $NF}' | sed 's/://g' | sort | head -1) | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null echo "${HWID}" } \ No newline at end of file