Bug 2016
| Summary: | Miscomputation of $PARENTDEVNAME in network-functions shell script | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | dharris |
| Component: | initscripts | Assignee: | David Lawrence <dkl> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.2 | CC: | dharris |
| 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: | 1999-04-05 22:05:55 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: | |||
will be fixed in next initscripts release. |
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=`echo $PARENTCONFIG | sed 's/^ifcfg-//g'` + PARENTDEVNAME=`basename $PARENTCONFIG | sed 's/^ifcfg-//g'` [ -f $PARENTCONFIG ] || { echo "Missing config file $PARENTCONFIG." >&2 exit 1 } . $PARENTCONFIG #### I don't see this causing any horrible errors in the near future. But, it is incorrect and will mess something up sometime.