lm-sensors

emperor ulist at gs1.ubuntuforums.org
Sun Oct 31 03:08:53 UTC 2004


The mkdev.sh script in the lm_sensors source package. Just so everyone
doesn't have to download the package, here is the "mkdev.sh". You will
need to paste this to a text file and then make the file executable
(chmod 755 mkdev.sh) and run in as root (sudo -s). After this run
"sensors-detect" and you are on your way!

#!/bin/bash

# Here you can set several defaults.

# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses
devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done

#end of file!


-- 
emperor




More information about the ubuntu-users mailing list