Bug 135405

Summary: Strange test of /class in /sbin/start_udev
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-11 08:53:54 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Göran Uddeborg 2004-10-12 11:35:04 EDT
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 04:45:36 EDT
thank god it's a double bug :)
Thank you very much for spotting this!