Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 480159 Details for
Bug 679445
openresolv/resolvconf support
Home
New
Search
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.rh90 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
0001-Use-sbin-resolvconf-when-installed-to-modify-etc-res.patch (text/plain), 3.72 KB, created by
Jiri Popelka
on 2011-02-22 15:38:25 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jiri Popelka
Created:
2011-02-22 15:38:25 UTC
Size:
3.72 KB
patch
obsolete
>From 9563f1bdca222287333072d9537672e1538a1431 Mon Sep 17 00:00:00 2001 >From: Jiri Popelka <jpopelka@redhat.com> >Date: Mon, 21 Feb 2011 19:41:20 +0100 >Subject: [PATCH] Use /sbin/resolvconf (when installed) to modify /etc/resolv.conf > >Also clean up change_resolv_conf(). >It can be called with more then one parameter but nobody does that >so remove that possibility. >--- > sysconfig/network-scripts/ifdown-post | 8 ++++-- > sysconfig/network-scripts/ifup-post | 10 +++++--- > sysconfig/network-scripts/network-functions | 28 +++++++++----------------- > 3 files changed, 21 insertions(+), 25 deletions(-) > >diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post >index 0a1b938..cb1367e 100755 >--- a/sysconfig/network-scripts/ifdown-post >+++ b/sysconfig/network-scripts/ifdown-post >@@ -19,9 +19,11 @@ source_config > /etc/sysconfig/network-scripts/ifdown-routes ${REALDEVICE} ${DEVNAME} > > if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then >- if [ -f /etc/resolv.conf.save ]; then >- change_resolv_conf /etc/resolv.conf.save >- rm -f /etc/resolv.conf.save >+ if [ -x /sbin/resolvconf ]; then >+ /sbin/resolvconf -f -d "initscripts" >+ elif [ -f /etc/resolv.conf.save ]; then >+ change_resolv_conf /etc/resolv.conf.save >+ rm -f /etc/resolv.conf.save > fi > if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then > if [ -f /etc/ppp/peers/$DEVICE ] ; then >diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post >index 29af56b..85ea3e7 100755 >--- a/sysconfig/network-scripts/ifup-post >+++ b/sysconfig/network-scripts/ifup-post >@@ -66,14 +66,16 @@ if [ "$PEERDNS" != "no" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; the > echo "search $DOMAIN $search" >> $tr > fi > >- # backup resolv.conf >- cp -af /etc/resolv.conf /etc/resolv.conf.save >- > # maintain permissions > # but set umask in case it doesn't exist! > oldumask=$(umask) > umask 022 >- change_resolv_conf $tr >+ if [ -x /sbin/resolvconf ]; then >+ /sbin/resolvconf -a "initscripts" < $tr >+ else >+ cp -af /etc/resolv.conf /etc/resolv.conf.save >+ change_resolv_conf $tr >+ fi > rm -f $tr > umask $oldumask > fi >diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions >index 562fe7c..c03e8cb 100644 >--- a/sysconfig/network-scripts/network-functions >+++ b/sysconfig/network-scripts/network-functions >@@ -293,7 +293,11 @@ set_hostname () > rsctmp=$(mktemp /tmp/XXXXXX); > cat /etc/resolv.conf > $rsctmp > echo "search $domain" >> $rsctmp >- change_resolv_conf $rsctmp >+ if [ -x /sbin/resolvconf ]; then >+ /sbin/resolvconf -a "initscripts" < $rsctmp >+ else >+ change_resolv_conf $rsctmp >+ fi > /bin/rm -f $rsctmp > fi > fi >@@ -386,30 +390,18 @@ is_bonding_device () > [ -f "/sys/class/net/$1/bonding/slaves" ] > } > >+ > # Invoke this when /etc/resolv.conf has changed: >+# See RHBZ #125712 >+# First (and only) parameter is path to temporary resolv conf file > change_resolv_conf () > { >+ # s = lines from /etc/resolv.conf with 'option' keyword > s=$(/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null); > if [ "x$s" != "x" ]; then > s="$s"$'\n'; > fi; >- if [ $# -gt 1 ]; then >- n_args=$#; >- while [ $n_args -gt 0 ]; >- do >- case "$s" in *$1*) >- shift; >- n_args=$(($n_args-1)); >- continue;; >- esac; >- s="$s$1"; >- shift; >- if [ $# -gt 0 ]; then >- s="$s"$'\n'; >- fi; >- n_args=$(($n_args-1)); >- done; >- elif [ $# -eq 1 ]; then >+ if [ $# -eq 1 ]; then > if [ "x$s" != "x" ]; then > s="$s"$(/bin/grep -vF "$s" $1); > else >-- >1.7.4 >
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 679445
: 480159