[tw] - more fixes for ip-up.local and ip-down.local examples: use
/var/run/ppp/resolv.conf instead of /etc/ppp/resolv.conf
This commit is contained in:
parent
706fd5a12b
commit
56e5d5392f
@ -1,44 +1,49 @@
|
||||
--- 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
|
||||
+++ ppp-2.4.2/scripts/ip-down.local.add 2004-09-14 14:36:20.058008752 +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
|
||||
-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
|
||||
+if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
||||
+ if [ -f /var/run/ppp/resolv.prev ]; then
|
||||
+ change_resolv_conf /var/run/ppp/resolv.prev
|
||||
else
|
||||
- rm -f /etc/resolv.conf
|
||||
+ change_resolv_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
--- 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 14:37:39.129061828 +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 [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
||||
+ rm -f /var/run/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
|
||||
+ cp /etc/resolv.conf /var/run/ppp/resolv.prev
|
||||
+ rscf=/var/run/ppp/resolv.new
|
||||
+ grep domain /var/run/ppp/resolv.prev > $rscf
|
||||
+ grep search /var/run/ppp/resolv.prev >> $rscf
|
||||
+ change_resolv_conf $rscf
|
||||
+ rm -f $rscf
|
||||
else
|
||||
- cp /etc/ppp/resolv.conf /etc
|
||||
+ change_resolv_conf /var/run/ppp/resolv.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user