From 5b7ddc4bd2dcdde201ffa2681ede9a0a029bad96 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 2 Jul 2021 22:47:46 +0200 Subject: Adding upstream version 1.14. Signed-off-by: Daniel Baumann --- scripts/gen-hostnqn.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/gen-hostnqn.sh b/scripts/gen-hostnqn.sh index d8783cf..5138f0c 100644 --- a/scripts/gen-hostnqn.sh +++ b/scripts/gen-hostnqn.sh @@ -2,7 +2,11 @@ LC_ALL=C -UUID=$(dmidecode -s system-uuid | tr -d '[:space:]') +if [ -e "/proc/device-tree/ibm,partition-uuid" ] ; then + UUID=$(tr -d '\0' < /proc/device-tree/ibm,partition-uuid) +else + UUID=$(dmidecode -s system-uuid | tr -d '[:space:]') +fi if [ -z "$UUID" ] ; then >&2 echo "No UUID found, can't determine hostnqn." -- cgit v1.2.3