summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-02 20:49:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-02 20:49:35 +0000
commitf2c543b4ccad3b9f8871d952cddf66b3b438595b (patch)
treec3c363d1cc72514221685c42a79a19b320114acc /scripts
parentAdding debian version 1.12-8. (diff)
downloadnvme-cli-f2c543b4ccad3b9f8871d952cddf66b3b438595b.tar.xz
nvme-cli-f2c543b4ccad3b9f8871d952cddf66b3b438595b.zip
Merging upstream version 1.14.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen-hostnqn.sh6
1 files changed, 5 insertions, 1 deletions
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."