Bug 124696

Summary: disklabel script trips on non-existing files
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: devlabelAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal
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: 2006-02-21 19:03:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2004-05-28 16:03:15 UTC
Description of problem:

'devlabel' script is using
IGNORE_LIST=/etc/sysconfig/devlabel.d/ignore_list
LAST_LIST=/etc/sysconfig/devlabel.d/proc_partitions
without checking for their existence but no package
provides these files, even empty, nor even
/etc/sysconfig/devlabel.d. Running 'rpm -ql devlabel | grep etc'
gives only /etc/sysconfig/devlabel

With a use of constructs like:

    if [ `grep -c "$1$" $IGNORE_LIST` -gt 0 ]; then
        return 1
    fi

and not even

    if [ `grep -c "$1$" $IGNORE_LIST /dev/null` -gt 0 ]; then
        return 1
    fi

comes a flood of error messages like

/sbin/devlabel: line 129: [: -gt: unary operator expected

and multiple "No such file or directory".

Version-Release number of selected component (if applicable):
devlabel-0.48.01-2

Comment 1 Bill Nottingham 2004-05-28 16:15:22 UTC

*** This bug has been marked as a duplicate of 124442 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:03:51 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.