Skip to content

Commit

Permalink
Merge pull request #89 from nsacyber/issue/88
Browse files Browse the repository at this point in the history
[#88] Handle case of empty NVMe nguid
  • Loading branch information
iadgovuser29 authored Feb 18, 2020
2 parents 8cf4c00 + 98c8764 commit 7c4e76b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ospackage {
os=LINUX
arch=NOARCH
version='1.1.4'
release='1'
release='2'

into '/opt/paccor'
user 'root'
Expand Down
3 changes: 3 additions & 0 deletions scripts/allcomponents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,9 @@ parseNvmeData () {
manufacturer="" # Making this appear as it does on windows, lshw doesn't see nvme drives and nvme-cli doesn't return a manufacturer field
model=$(nvmeGetModelNumberForDevice "$i")
serial=$(nvmeGetNguidForDevice "$i")
if [[ $serial =~ ^[0]+$ ]]; then
serial=$(nvmeGetEuiForDevice "$i")
fi
revision="" # empty for a similar reason to the manufacturer field

if [[ -z "${manufacturer// }" ]]; then
Expand Down

0 comments on commit 7c4e76b

Please sign in to comment.