Bug 135405 - Strange test of /class in /sbin/start_udev
Summary: Strange test of /class in /sbin/start_udev
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: udev   
(Show other bugs)
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-12 15:35 UTC by Göran Uddeborg
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-11 13:53:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Göran Uddeborg 2004-10-12 15:35:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.2)
Gecko/20040809

Description of problem:
In /sbin/start_udev, on line 24, there is a test

   [ ! -d $sysfs_dir/class ] || exit 1

Unless sysfs_dir is imported in the environment, the semantics of this
line is to exit if there does exist a directory /class.  Probably that
is seldom the case.

Later on, on line 33, the variable used above is set

   sysfs_dir=/sys

Version-Release number of selected component (if applicable):
udev-032-8

How reproducible:
Always

Steps to Reproduce:
1.mkdir /class
2./sbin/start_udev

(I haven't actually run this.  I found this during a "code inspection".)

Additional info:

Presumably, the variable settings should be done before the tests, and
this particular test should be inverted. 

   [ -d $sysfs_dir/class ] || exit 1

Comment 1 Harald Hoyer 2004-10-13 08:45:36 UTC
thank god it's a double bug :)
Thank you very much for spotting this!


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