diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-02 20:47:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-02 20:47:46 +0000 |
commit | 5b7ddc4bd2dcdde201ffa2681ede9a0a029bad96 (patch) | |
tree | 352b477f97c1c36105310589c7568259c76e9385 /scripts | |
parent | Adding upstream version 1.12. (diff) | |
download | nvme-cli-5b7ddc4bd2dcdde201ffa2681ede9a0a029bad96.tar.xz nvme-cli-5b7ddc4bd2dcdde201ffa2681ede9a0a029bad96.zip |
Adding upstream version 1.14.upstream/1.14
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gen-hostnqn.sh | 6 |
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." |