Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 2016 - Miscomputation of $PARENTDEVNAME in network-functions shell script
Summary: Miscomputation of $PARENTDEVNAME in network-functions shell script
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-04-05 21:58 UTC by dharris
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-04-05 22:05:55 UTC

Attachments (Terms of Use)

Description dharris 1999-04-05 21:58:03 UTC
This error is in the file /etc/sysconfig/network-
scripts/network-functions from initscripts-3.78-1.

If the function source_config is given a $CONFIG which has
path elements (such as "/path/to/file" and not just
"file"), the variable $PARENTDEVNAME will be incorrectly
computed. The path elements will not be stripped with
"basename", as they are when computing $DEVNAME.

Here is the patch: (hope it does not get too mangled.)

--- network-functions.orig   Thu Oct 15 12:07:52 1998
+++ network-functions       Mon Apr  5 17:55:37 1999
@@ -5,11 +5,11 @@
     DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'`

     if basename $CONFIG | grep -q '[^g]-' ; then
        PARENTCONFIG=`echo $CONFIG | sed 's/-[^-]*$//g'`
+       PARENTDEVNAME=`basename $PARENTCONFIG | sed
        [ -f $PARENTCONFIG ] || {
            echo "Missing config file $PARENTCONFIG." >&2
            exit 1

I don't see this causing any horrible errors in the near
future. But, it is incorrect and will mess something up

Comment 1 Bill Nottingham 1999-04-05 22:05:59 UTC
will be fixed in next initscripts release.

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