Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 681968 Details for
Bug 892703
Bridge member is pointing to wrong bridge with biosdevname devices
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch v5
patch (text/plain), 2.76 KB, created by
Dave Young
on 2013-01-18 02:20:59 UTC
(
hide
)
Description:
patch v5
Filename:
MIME Type:
Creator:
Dave Young
Created:
2013-01-18 02:20:59 UTC
Size:
2.76 KB
patch
obsolete
>From: Fabian Deutsch <fabiand@fedoraproject.org> > >This patch fixes the renaming of ifnames within config files, because >the current greedy approach could lead to incorrect configurations. >Take for example this (partial) ifcfg-eth0 lines: > >DEVICE=eth0 >BRIDGE=breth0 > >would be substitute eth0 in both places (DEVICE and BRIDGE) even if the >bridge name is the same on the host and under the kdump kernel: > >DEVICE=em1 >BRIDGE=brem1 >(incorrect) > >The new approach is more fine grained and respects the formats of >different configuration files to allow a saner replacement of the >ifnames in the correct places. This means that only the device name is >replaced where it is appropriate (so only in the DEVICE entry): > >DEVICE=em1 >BRIDGE=breth0 >(correct) > >rhbz#892703 > >v4->v5: >remove changes about bonding device renaming which does not work before. > >Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org> >Signed-off-by: Dave Young <dyoung@redhat.com> >--- > mkdumprd | 33 +++++++++++++++++++++++++++------ > 1 files changed, 27 insertions(+), 6 deletions(-) > >diff --git a/mkdumprd b/mkdumprd >index 898f9cb..a3db955 100644 >--- a/mkdumprd >+++ b/mkdumprd >@@ -2242,6 +2242,30 @@ EOF > > cat >> $SCRIPTDIR/rename_interfaces << EOF > #!/bin/hush >+ >+rename_iface_in_file() >+{ >+ local i=\$1 >+ local CURRENT=\$2 >+ local INTERIM=\$3 >+ >+ fname=\$(basename \$i) >+ case \$fname in >+ ifcfg-*) >+ # Replace iface occurences only in DEVICE lines >+ sed -i 's,'"\(^DEVICE=\)\"\?\$CURRENT\"\?\$"','"\1\$INTERIM"',' \$i >+ ;; >+ iface_to_activate) >+ # Replace iface occurences in lines containg exact this iface >+ sed -i 's,'"^\$CURRENT\$"','"\$INTERIM"',' \$i >+ ;; >+ interfaces) >+ # Replace iface occurences only in iface lines >+ sed -i 's,'"\(^iface\ \)\$CURRENT\ "','"\1\$INTERIM\ "',' \$i >+ ;; >+ esac >+} >+ > MAP_COUNT=\`awk 'END{print NR}' /etc/iface_map\` > #now do all the renaming - first to temp space > for j in \`seq 1 1 \$MAP_COUNT\` >@@ -2252,8 +2276,7 @@ do > mv /etc/ifcfg-\$CURRENT /etc/ifcfg-\$INTERIM > for i in /etc/ifcfg-\$INTERIM /etc/iface_to_activate /etc/network/interfaces > do >- awk -v str1="\$CURRENT" -v str2="\$INTERIM" '{gsub(str1,str2);print}' \$i > \$i.tmp >- mv \$i.tmp \$i >+ rename_iface_in_file "\$i" "\$CURRENT" "\$INTERIM" > done > if [ -f /etc/cluster_iface ] > then >@@ -2271,8 +2294,7 @@ do > mv /etc/ifcfg-\$INTERIM /etc/ifcfg-\$NEW > for i in /etc/ifcfg-\$NEW /etc/iface_to_activate /etc/network/interfaces > do >- awk -v str1="\$INTERIM" -v str2="\$NEW" '{gsub(str1,str2);print}' \$i > \$i.tmp >- mv \$i.tmp \$i >+ rename_iface_in_file "\$i" "\$INTERIM" "\$NEW" > done > if [ -f /etc/cluster_iface ] > then >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 892703
: 681968