Skip to content

Commit

Permalink
Update smartmon.sh
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Swarbrick <[email protected]>
Signed-off-by: Mykhailo Kravchuk <[email protected]>
  • Loading branch information
mvk15 and dswarbrick authored Oct 22, 2024
1 parent c10a458 commit e93d847
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion smartmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ smartctl_version="$(/usr/sbin/smartctl -V | awk 'NR==1 && $1 == "smartctl" {prin
echo "smartctl_version{version=\"${smartctl_version}\"} 1" | format_output

# Exit if "smartctl" version is lower 6
[[ ${smartctl_version%.*} -lt 6 ]] && exit 0
if [[ ${smartctl_version%.*} -lt 6 ]]; then
exit 0
fi

device_list="$(/usr/sbin/smartctl --scan-open | awk '/^\/dev/{print $1 "|" $3}')"

Expand Down

0 comments on commit e93d847

Please sign in to comment.