summarylogtreecommitdiffstats
path: root/ip-up.d.dns.sh
blob: 0fc737eca1537c86d90bff551ef53bf325b17cbd (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

if [ "$USEPEERDNS" = "1" -a -f /etc/ppp/resolv.conf ]; then
  if [ -x /usr/bin/resolvconf ]; then
    /usr/bin/resolvconf -a ${IFNAME} </etc/ppp/resolv.conf
  else
    [ -e /etc/resolv.conf ] && mv /etc/resolv.conf /etc/resolv.conf.backup.${IFNAME}
    mv /etc/ppp/resolv.conf /etc/resolv.conf
    chmod 644 /etc/resolv.conf
  fi
fi