Skip to content

Commit

Permalink
Fix: simplified return value checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersulyok committed Jan 26, 2025
1 parent 5556f16 commit 7b4e5cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/hddtemp_emu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# hddtemp_emu.sh (C) 2025, Peter Sulyok
# This script will emulate hddtemp command (with the help of `smartctl`).
# The expected use (based on the way how smfc.py is calling hddtemp):
# The expected use (based on the way how `smfc.py` is calling `hddtemp`):
#
# $ hddtemp_emu.sh -q -n /dev/sda
# 27
Expand All @@ -24,8 +24,7 @@ fi

# Read disk temperature with `smartctl` command.
hdd_temp=$(smartctl -a $3|grep -m 1 Temp|tr -s " "|cut -d" " -f 10)
rv=$?

# Print the temperature out.
echo "$hdd_temp"
exit $rv
exit 0

0 comments on commit 7b4e5cf

Please sign in to comment.