Bug 124311 - sensors-detect wrong path for i2cdetect program
sensors-detect wrong path for i2cdetect program
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: lm_sensors (Show other bugs)
2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-25 12:03 EDT by Adam Bowns
Modified: 2015-03-04 20:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-06 06:30:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Bowns 2004-05-25 12:03:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
/usr/sbin/sensors-detect contains the wrong path to the i2cdetect
program, thus producing

"Can't exec "i2cdetect": No such file or directory at
/usr/sbin/sensors-detect line 4052, <STDIN> line 9.
Couldn't find i2cdetect program!! at /usr/sbin/sensors-detect line
4052, <STDIN> line 9."

errors every time the program is called.

To fix this you need to change all references to i2cdetect with
/usr/sbin/i2cdetect and it works fine.

Version-Release number of selected component (if applicable):
lm_sensors-2.8.6-1

How reproducible:
Always

Steps to Reproduce:
1. execute /usr/sbin/sensors-detect
2. follow on screen prompts
    

Actual Results:  "Can't exec "i2cdetect": No such file or directory at
/usr/sbin/sensors-detect line 4052, <STDIN> line 9.
Couldn't find i2cdetect program!! at /usr/sbin/sensors-detect line
4052, <STDIN> line 9."

Expected Results:  should have used correct path and the program would
have been found.

Additional info:
Comment 1 Phil Knirsch 2004-07-02 10:36:32 EDT
Did you run sensors-detect as root?

If not, then /usr/sbin is most likely not in your search patch and
i2cdetect won't be found.

Read ya, Phil
Comment 2 Adam Bowns 2004-07-04 20:42:29 EDT
I did run the script as root, AFAIK /usr/sbin/ is not a default search
path for root either... try for yourself if you don't believe me :-)
Comment 3 Kostas Georgiou 2004-07-06 06:25:49 EDT
You need su - to get /sbin/,/usr/sbin/ in your PATH. 
Comment 4 Phil Knirsch 2004-07-06 06:30:23 EDT
Jep, i just tried, a "real" root login has this default PATH variable
in the current rawhide tree:

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin

And that contains /usr/sbin, so i guess you are using su without the -
(which is a very bad idea in general btw. ;-).

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.