ubuntuusers.de

Zuordnung /sys/class/hwmon

Autor:
ngc2997
Datum:
29. April 2011 08:02
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

for (( i = 0; i < 4; i++ ))
do

  echo $i

  if [ -f /sys/class/hwmon/hwmon$i/name ]; then

    content=$(cat /sys/class/hwmon/hwmon$i/name)

    if [ $content=="atk0110" ]; then
      atk0110=$i
    fi

    if [ $content=="radeon" ]; then
      radeon=$i
    fi

  fi

done

echo $atk0110
echo $radeon