Changeset 4285

Show
Ignore:
Timestamp:
01/07/07 19:33:23 (6 years ago)
Author:
khali
Message:

unhide_ICH_SMBus: New features!
* check that the user is root
* check if the SMBus is already there
* only load i2c-i801 if needed
* show the SMBus device line on success

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4283 r4285  
    2626  Program i2cdetect: Make the output clearer 
    2727  Program py-smbus: New! Python i2c-dev bindings (prog/py-smbus) 
    28   Program unhide_ICH_SMBus: New! Unhides the ICH SMBus even for 2.6 kernels 
     28  Program unhide_ICH_SMBus: New! Unhides the ICH SMBus for 2.6 kernels 
    2929                            without need of recompilation. 
    3030  Programs dump/*: More robust handling of user inputs 
  • lm-sensors/trunk/prog/hotplug/unhide_ICH_SMBus

    r4283 r4285  
    1111pcibus="/sys/bus/pci/slots/" 
    1212device="00:1f" 
     13 
     14if [ "$UID" -ne 0 ] ; then 
     15        echo "You need to be root to run this script!" 
     16        exit 252 
     17fi 
     18 
     19smbus=`lspci -n -s $device.3 | grep -i '0c05: *8086'` 
     20if [ -n "$smbus" ] ; then 
     21        echo "ICH SMBus is already there!" 
     22        lspci -s $device.3 
     23        exit 
     24fi 
    1325 
    1426intel=`lspci -n -s $device.0 | grep 8086` 
     
    3648        exit 253; 
    3749fi 
    38 echo "Done, loading i2c-i801 ..." 
    39 modprobe i2c-i801  &> /dev/null 
     50 
     51if [ ! -d "/sys/bus/pci/drivers/i801_smbus" ] ; then 
     52        echo "Loading i2c-i801 ..." 
     53        modprobe i2c-i801 
     54        if [ $? -ne 0 ] ; then 
     55                exit 251 
     56        fi 
     57fi 
     58 
     59lspci -s $device.3 
     60echo "Done!"