Skip to content

Commit

Permalink
Adjust thermal readouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kaiser committed Apr 20, 2017
1 parent d6dbec1 commit a52c74a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions scripts/armhwinfo
Expand Up @@ -55,17 +55,12 @@ prepare_temp_monitoring() {

# SoC temp: check standard location first
if [[ -d "/sys/devices/virtual/thermal/thermal_zone0" ]]; then
# mainline kernel, Armada 38x, sun50i legacy
# mainline kernel, Armada 38x, sun50i/sun8i legacy
ln -fs /sys/devices/virtual/thermal/thermal_zone0/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/class/thermal/thermal_zone1" ]]; then
# sun8i legacy
ln -fs /sys/class/thermal/thermal_zone1/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/devices/virtual/thermal/thermal_zone1" ]]; then
# S500
# S500 legacy -- thermal_zone0 is battery here
# RK3288 legacy -- thermal_zone2 is gpu_thermal here
ln -fs /sys/devices/virtual/thermal/thermal_zone1/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/class/thermal/thermal_zone2" ]]; then
# RK3288 legacy
ln -fs /sys/class/thermal/thermal_zone2/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/devices/platform/a20-tp-hwmon" ]]; then
# sun7i legacy
ln -fs /sys/devices/platform/a20-tp-hwmon/temp1_input /etc/armbianmonitor/datasources/soctemp
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-motd.d/30-sysinfo
Expand Up @@ -102,7 +102,7 @@ function storage_info() {
RootInfo=$(df -h /)
root_usage=$(awk '/\// {print $(NF-1)}' <<<${RootInfo} | sed 's/%//g')
root_total=$(awk '/\// {print $(NF-4)}' <<<${RootInfo})
StorageInfo=$(df -h $storage | grep $storage)
StorageInfo=$(df -h $storage 2>/dev/null | grep $storage)
if [ -n "${StorageInfo}" ]; then
storage_usage=$(awk '/\// {print $(NF-1)}' <<<${StorageInfo} | sed 's/%//g')
storage_total=$(awk '/\// {print $(NF-4)}' <<<${StorageInfo})
Expand Down

0 comments on commit a52c74a

Please sign in to comment.