From cde2830f103bd3ad372b0e33263d589ad7db88e2 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 1 Apr 1999 11:44:16 +0000 Subject: [PATCH] examples for RH linux --- scripts/ip-down.local.add | 20 ++++++++++++++++++++ scripts/ip-up.local.add | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 scripts/ip-down.local.add create mode 100644 scripts/ip-up.local.add diff --git a/scripts/ip-down.local.add b/scripts/ip-down.local.add new file mode 100644 index 0000000..b93590e --- /dev/null +++ b/scripts/ip-down.local.add @@ -0,0 +1,20 @@ + +# +# This sample code shows you one way to modify your setup to allow automatic +# configuration of your resolv.conf for peer supplied DNS addresses when using +# the `usepeerdns' option. +# +# In my case I just added this to my /etc/ppp/ip-down.local script. You may need to +# create an executable script if one does not exist. +# +# Nick Walker (nickwalker@email.com) +# + +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 + else + rm -f /etc/resolv.conf + fi +fi + diff --git a/scripts/ip-up.local.add b/scripts/ip-up.local.add new file mode 100644 index 0000000..70cf8c6 --- /dev/null +++ b/scripts/ip-up.local.add @@ -0,0 +1,24 @@ + +# +# This sample code shows you one way to modify your setup to allow automatic +# configuration of your resolv.conf for peer supplied DNS addresses when using +# the `usepeerdns' option. +# +# In my case I just added this to my /etc/ppp/ip-up.local script. You may need to +# create an executable script if one does not exist. +# +# Nick Walker (nickwalker@email.com) +# + +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 >> /etc/resolv.conf + else + cp /etc/ppp/resolv.conf /etc + fi +fi + -- 2.39.2