Bug 119044

Summary: Kudzu removes valid duplicate entries from modules.conf
Product: [Fedora] Fedora Reporter: Panu Matilainen <pmatilai>
Component: kudzuAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-24 16:39:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Don't consider lines beginning with else and endif as duplicates none

Description Panu Matilainen 2004-03-24 09:29:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040315

Description of problem:
If you have more than one if/else/endif constructs in modules.conf,
kudzu considers the else and endif lines as duplicates and removes
them, thus breaking the config.

The construc I noticed this with is this:
if -f /etc/modules.conf.d/*.conf
include /etc/modules.conf.d/*.conf
endif
if -f /etc/modules.conf.d/`uname -r`/*.conf
include /etc/modules.conf.d/`uname -r`/*.conf
endif


Version-Release number of selected component (if applicable):
0.99.65-1 - 1.1.36.1-1 at least

How reproducible:
Always

Steps to Reproduce:
1. Add the example construct in description to modules.conf
2. Run kudzu so that it detects new hardware and rewrites modules.conf

    

Actual Results:  The second endif disappears breaking modutils.

Expected Results:  The endif should stay there..

Additional info:

Also affects at least RHL 9 and RHEL 3. 

The new modutils in FC2-test doesn't support if-else-endif constructs
and based on a quick check isn't affected by this in any other way
either, but something to keep in mind for the future there too.

Comment 1 Panu Matilainen 2004-03-24 09:33:27 UTC
Created attachment 98820 [details]
Don't consider lines beginning with else and endif as duplicates

Very low priority since these type of constructs are rare so this is more FYI.
In any case this patch fixes the problem for me.

Comment 2 Bill Nottingham 2004-03-24 16:39:30 UTC
This almost certainly won't be fixed, as modprobe.conf doesn't support
conditionals, and that's where all the new development is.

Comment 3 Panu Matilainen 2004-03-24 17:00:15 UTC
Yup, wasn't expecting this to be fixed, reported just to
1) have data available about existence of such an issue
2) point out that checking if similar issue can happen in the new
modprobe.conf format (yes I know it doesn't support conditionals but
just perhaps some other option/command) wouldn't hurt