ALT Linux Bugzilla
– Attachment 3558 Details for
Bug 19635
Нужна поддержка openresolv
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
0002-ip-up-Rewrite-openresolv-support.patch
0002-ip-up-Rewrite-openresolv-support.patch (text/plain), 1.99 KB, created by
Alexey Gladkov
on 2009-05-26 18:49:27 MSD
(
hide
)
Description:
0002-ip-up-Rewrite-openresolv-support.patch
Filename:
MIME Type:
Creator:
Alexey Gladkov
Created:
2009-05-26 18:49:27 MSD
Size:
1.99 KB
patch
obsolete
>From fe25b96c7ae70a3cb392b45937377b97a535a1dd Mon Sep 17 00:00:00 2001 >From: Dmitry V. Levin <ldv@altlinux.org> >Date: Tue, 26 May 2009 12:41:34 +0000 >Subject: [PATCH 2/2] ip-up: Rewrite openresolv support > >Use environment variables $DNS1 and $DNS2 instead of /etc/ppp/resolv.conf, >because this file is not reliable source. >--- > ppp-common/ppp/ip-up | 26 ++++++++++++++++++++------ > 1 files changed, 20 insertions(+), 6 deletions(-) > >diff --git a/ppp-common/ppp/ip-up b/ppp-common/ppp/ip-up >index d0fcb40..e2bf19c 100755 >--- a/ppp-common/ppp/ip-up >+++ b/ppp-common/ppp/ip-up >@@ -32,7 +32,6 @@ REALDEVICE=$1 > NS_IFUP=/etc/sysconfig/network-scripts/ifup-post > N_C_S_CONFIG=/etc/sysconfig/network > RESOLVCONF=/sbin/resolvconf >-PPP_RESOLV_CONF=/etc/ppp/resolv.conf > > export PATH=/sbin:/usr/sbin:/bin:/usr/bin > >@@ -56,11 +55,12 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin > . /etc/init.d/functions > SourceIfNotEmpty $N_C_S_CONFIG > >+[ -z "$MS_DNS1" ] || DNS1=$MS_DNS1 >+[ -z "$MS_DNS2" ] || DNS2=$MS_DNS2 >+ > # taken from net-scripts >-modify_resolver() >+modify_resolv_conf() > { >- [ -z "$MS_DNS1" ] || DNS1=$MS_DNS1 >- [ -z "$MS_DNS2" ] || DNS2=$MS_DNS2 > local tr > if [ -n "$DNS1" ] && ! grep -qs "^nameserver $DNS1" /etc/resolv.conf && > tr=`mktemp /etc/resolv.conf.XXXXXX`; then >@@ -117,12 +117,26 @@ modify_resolver() > fi > } > >+update_via_resolvconf() >+{ >+ local t >+ t=$(mktemp -t resolv.conf.XXXXXXXXXX) || return >+ local d >+ for d in $DNS1 $DNS2; do >+ echo "nameserver $d" >"$t" >+ done >+ if [ -s "$t" ]; then >+ "$RESOLVCONF" -a "$REALDEVICE" <"$t" >+ fi >+ rm -f -- "$t" >+} >+ > if ! is_no "$RESOLV_MODS"; then > if [ -x "$RESOLVCONF" ]; then >- [ -f "$PPP_RESOLV_CONF" ] && $RESOLVCONF -a $REALDEVICE <$PPP_RESOLV_CONF >+ update_via_resolvconf > else > # check if kppp was here, don't touch /etc/resolv.conf then, just UC >- grep -iqs '#.*ppp temp entry' /etc/resolv.conf || modify_resolver >+ grep -iqs '#.*ppp temp entry' /etc/resolv.conf || modify_resolv_conf > UC=/usr/sbin/update_chrooted > [ -x $UC ] && $UC conf > fi >-- >1.6.3.1 >
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 19635
:
3557
| 3558