Re: DNS resolv.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

this is - i think - the relevant section from my ip-up script.
I'm a bloody beginner so I don't know if I should uncomment
all of this o only a part of it. I've read it through and through,
but it won't help.

Thanks Tom

# Analog-PPP, add commands as you need...
    case "$BASENAME" in
    ip-up)
 #
 # This code allows automatic configuration of your resolv.conf
        # for peer supplied DNS addresses when using the `usepeerdns'
 # option. Original resolv.conf is restored when ip-down is called
 # by pppd when the link goes down.
 #
 if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
  rm -f /etc/ppp/resolv.prev
  if [ -f /etc/resolv.conf ]; then
   cp -p /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
   echo "Modified /etc/resolv.conf for DNS at $INTERFACE"
  else
   cp /etc/ppp/resolv.conf /etc
   chmod 644 /etc/resolv.conf
                        echo "Installed /etc/resolv.conf for DNS at
$INTERFACE"
  fi
  if [ "$START_NSCD" = yes ]; then
   /sbin/init.d/nscd restart &
  fi
 fi
 test -x /etc/ppp/ip-up.local && /etc/ppp/ip-up.local $*
        ;;
    ip-down)
 #
 # This code restores the original resolv.conf saved when ip-up
 # was called by the pppd which uses the `usepeerdns' option and
 # resolv.conf was modified for the supplied dns server adresses.
 #
 if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
  if [ -f /etc/ppp/resolv.prev ]; then
   cp -fp /etc/ppp/resolv.prev /etc/resolv.conf
   echo "Restored original /etc/resolv.conf"
  else
   rm -f /etc/resolv.conf
   echo "Deinstalled /etc/resolv.conf"
  fi
  if [ "$START_NSCD" = yes ]; then
   /sbin/init.d/nscd restart &
  fi
 fi
 test -x /etc/ppp/ip-down.local && /etc/ppp/ip-down.local $*
        ;;
    *)
        ;;
    esac
    ;;
*)
    # dont know...
    ;;
esac | logger -t $BASENAME


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux