jobcore/ppp/ip-up.d.dns.sh

12 lines
344 B
Bash
Raw Normal View History

2022-03-20 13:19:37 +01:00
#!/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