Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nvme smart bug #750

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions agents/plugins/smart
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ main() {
# 2012-01-25 Stefan Kaerst CDJ - in case $N does not exist
VEND=ATA
fi
# Check if "nvme" is in $N
# some nvme disks can be misclassified as ATA with the above
if [[ "$N" == *nvme* ]]; then
VEND=NVME
fi
if [ -r "$BLOCK_PATH"/"$N"/device/model ]; then
MODEL=$(sed -e 's/ /_/g' -e 's/_*$//g' <"$BLOCK_PATH"/"$N"/device/model)
else
Expand Down
Loading