mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-23 20:11:42 +00:00
Delete grab_busses.sh, it's deprecated. Use sensors --bus-list instead.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4782 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
8f352d518c
commit
042532f7fb
4 files changed
+6
-44
No files matched your search
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This simple shell script grabs the contents of /proc/bus/i2c and outputs it
|
||||
# in sensors.conf format through stdout. You can use it to generate those
|
||||
# nasty 'bus' statements in config files.
|
||||
|
||||
if [ $# = 0 ] ; then
|
||||
file=/proc/bus/i2c
|
||||
elif [ $# = 1 ] ; then
|
||||
file="$1"
|
||||
else
|
||||
echo "Syntax: grab_busses [file]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "$file" ]; then
|
||||
echo "Can't find file \`$file';"\
|
||||
"try \`modprobe i2c-proc' for /proc/bus/i2c" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat -- "$file" | awk \
|
||||
' BEGIN { FS = "\t" }
|
||||
{ sub(" *$","",$3)
|
||||
sub(" *$","",$4)
|
||||
printf "bus \"%s\" \"%s\" \"%s\"\n",$1,$3,$4 }
|
||||
{ nrlines++ }
|
||||
END { printf "Total lines: %d\n",nrlines > "/dev/stderr" }
|
||||
'
|
||||
Reference in new issue
Block a user