[tw] - example scripts are using change_resolv_conf to modify
/etc/resolv.conf (#132482)
This commit is contained in:
parent
72f927b491
commit
2d9ec4a351
44
ppp-2.4.2-change_resolv_conf.patch
Normal file
44
ppp-2.4.2-change_resolv_conf.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
--- ppp-2.4.2/scripts/ip-up.local.add.change_resolv_conf 1999-11-15 04:28:10.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/scripts/ip-up.local.add 2004-09-14 11:22:24.620206141 +0200
|
||||||
|
@@ -9,16 +9,19 @@
|
||||||
|
#
|
||||||
|
# Nick Walker (nickwalker@email.com)
|
||||||
|
#
|
||||||
|
+. /etc/sysconfig/network-scripts/network-functions
|
||||||
|
|
||||||
|
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
|
||||||
|
rm -f /etc/ppp/resolv.prev
|
||||||
|
if [ -f /etc/resolv.conf ]; then
|
||||||
|
cp /etc/resolv.conf /etc/ppp/resolv.prev
|
||||||
|
- grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
|
||||||
|
- grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
|
||||||
|
- cat /etc/ppp/resolv.conf >> /etc/resolv.conf
|
||||||
|
+ rscf=/var/run/ppp/resolv.new
|
||||||
|
+ grep domain /etc/ppp/resolv.prev > $rscf
|
||||||
|
+ grep search /etc/ppp/resolv.prev >> $rscf
|
||||||
|
+ change_resolv_conf $rscf
|
||||||
|
+ rm -f $rscf
|
||||||
|
else
|
||||||
|
- cp /etc/ppp/resolv.conf /etc
|
||||||
|
+ change_resolv_conf /etc/ppp/resolv.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
--- ppp-2.4.2/scripts/ip-down.local.add.change_resolv_conf 1999-02-27 05:32:42.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/scripts/ip-down.local.add 2004-09-14 10:12:09.666702939 +0200
|
||||||
|
@@ -9,12 +9,13 @@
|
||||||
|
#
|
||||||
|
# Nick Walker (nickwalker@email.com)
|
||||||
|
#
|
||||||
|
+. /etc/sysconfig/network-scripts/network-functions
|
||||||
|
|
||||||
|
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
|
||||||
|
if [ -f /etc/ppp/resolv.prev ]; then
|
||||||
|
- cp -f /etc/ppp/resolv.prev /etc/resolv.conf
|
||||||
|
+ change_resolv_conf /etc/ppp/resolv.prev
|
||||||
|
else
|
||||||
|
- rm -f /etc/resolv.conf
|
||||||
|
+ change_resolv_conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
8
ppp.spec
8
ppp.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: The PPP (Point-to-Point Protocol) daemon.
|
Summary: The PPP (Point-to-Point Protocol) daemon.
|
||||||
Name: ppp
|
Name: ppp
|
||||||
Version: 2.4.2
|
Version: 2.4.2
|
||||||
Release: 4
|
Release: 5
|
||||||
License: distributable
|
License: distributable
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz
|
Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz
|
||||||
@ -18,6 +18,7 @@ Patch7: ppp-2.4.2-pie.patch
|
|||||||
Patch8: ppp-2.4.2-fix.patch
|
Patch8: ppp-2.4.2-fix.patch
|
||||||
Patch9: ppp-2.4.2-fix64.patch
|
Patch9: ppp-2.4.2-fix64.patch
|
||||||
Patch10: ppp-2.4.2-signal.patch
|
Patch10: ppp-2.4.2-signal.patch
|
||||||
|
Patch11: ppp-2.4.2-change_resolv_conf.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
BuildPrereq: pam-devel, libpcap
|
BuildPrereq: pam-devel, libpcap
|
||||||
@ -45,6 +46,7 @@ organization over a modem and phone line.
|
|||||||
%patch8 -p1 -b .fix
|
%patch8 -p1 -b .fix
|
||||||
%patch9 -p1 -b .fix64
|
%patch9 -p1 -b .fix64
|
||||||
%patch10 -p1 -b .signal
|
%patch10 -p1 -b .signal
|
||||||
|
%patch11 -p1 -b .change_resolv_conf
|
||||||
|
|
||||||
find . -type f -name "*.sample" | xargs rm -f
|
find . -type f -name "*.sample" | xargs rm -f
|
||||||
|
|
||||||
@ -99,6 +101,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc FAQ PLUGINS README README.cbcp README.linux README.MPPE README.MSCHAP80 README.MSCHAP81 README.pwfd README.pppoe scripts sample
|
%doc FAQ PLUGINS README README.cbcp README.linux README.MPPE README.MSCHAP80 README.MSCHAP81 README.pwfd README.pppoe scripts sample
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 14 2004 Thomas Woerner <twoerner@redhat.com> 2.4.2-5
|
||||||
|
- example scripts are using change_resolv_conf to modify /etc/resolv.conf
|
||||||
|
(#132482)
|
||||||
|
|
||||||
* Fri Aug 6 2004 Thomas Woerner <twoerner@redhat.com> 2.4.2-4
|
* Fri Aug 6 2004 Thomas Woerner <twoerner@redhat.com> 2.4.2-4
|
||||||
- fixed signal handling (#29171)
|
- fixed signal handling (#29171)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user