Small fix
This commit is contained in:
parent
192ce3e9b4
commit
f04897fffd
1 changed files with 6 additions and 1 deletions
|
|
@ -67,7 +67,12 @@ in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get health status (using sudo for disk access)
|
# Get health status (using sudo for disk access)
|
||||||
HEALTH=$(sudo ${pkgs.smartmontools}/bin/smartctl $SMART_OPTS -H "${device}" 2>/dev/null | ${pkgs.gnugrep}/bin/grep -o "PASSED\|FAILED" | head -1 || echo "UNKNOWN")
|
HEALTH_OUTPUT=$(sudo ${pkgs.smartmontools}/bin/smartctl $SMART_OPTS -H "${device}" 2>/dev/null)
|
||||||
|
if HEALTH=$(echo "$HEALTH_OUTPUT" | ${pkgs.gnugrep}/bin/grep -o "PASSED\|FAILED" | head -1); then
|
||||||
|
: # HEALTH is set
|
||||||
|
else
|
||||||
|
HEALTH="UNKNOWN"
|
||||||
|
fi
|
||||||
|
|
||||||
# Get temperature
|
# Get temperature
|
||||||
TEMP="N/A"
|
TEMP="N/A"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue