[i2c] sensors-detect path issue under fc5 / 6 -- fix included.
Vince Spinelli
Vince at SpinelliCreations.com
Sun Mar 4 09:04:42 CET 2007
It's a simple one, but it's worth noting.
I'm unawares of other distributions, but under Fedora Core 5 and 6, the
i2cdetect command is located in the /usr/sbin directory, not /sbin/ nor
/usr/local/sbin.
As a result, an error message is encountered when running
sensors-detect.sh as either root, sudo root, or a normal user.
The fix is as follows... inside of the sensors-detect.sh script, there's a
segment to add directories to path.
Change -->
# Just in case a root user doesn't have /sbin in his/her path for some reason
# (was seen once)
$ENV{PATH} = '/sbin:'.$ENV{PATH}
unless $ENV{PATH} =~ m,(^|:)/sbin/?(:|$),;
# Same for /usr/local/sbin since we need i2cdetect which is installed there
# by default (reported by Lennard Klein)
$ENV{PATH} = '/usr/local/sbin:'.$ENV{PATH}
unless $ENV{PATH} =~ m,(^|:)/usr/local/sbin/?(:|$),;
To -->
# Just in case a root user doesn't have /sbin in his/her path for some reason
# (was seen once)
$ENV{PATH} = '/sbin:'.$ENV{PATH}
unless $ENV{PATH} =~ m,(^|:)/sbin/?(:|$),;
# Same for /usr/local/sbin since we need i2cdetect which is installed there
# by default (reported by Lennard Klein)
$ENV{PATH} = '/usr/local/sbin:'.$ENV{PATH}
unless $ENV{PATH} =~ m,(^|:)/usr/local/sbin/?(:|$),;
# Same for /usr/sbin, for FC default dir (location of i2cdetect - V.
Spinelli)
$ENV{PATH} = '/usr/sbin:'.$ENV{PATH}
unless $ENV{PATH} =~ m,(^|:)/usr/sbin/?(:|$),;
And that fixes it.
---------------------------------------
Vince Spinelli
University at Buffalo: EE
---------------------------------------
"Kind of off his mental reservation."
- ancient cowboy wisdom.
---------------------------------------
Vince at SpinelliCreations.com
[vfs at buffalo.edu / vfs at eng.buffalo.edu]
------------------------------------------
SC Secure Webmail: Powered by SquirrelMail
More information about the i2c
mailing list