| Server IP : 104.21.84.107 / Your IP : 104.23.243.196 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /etc/ppp/ip-up.d/ |
Upload File : |
#!/bin/sh -e
# this variable is only set if the usepeerdns pppd option is being used
[ "$USEPEERDNS" ] || exit 0
# exit if the resolvconf package is installed
[ -x /sbin/resolvconf ] && exit 0
# exit if systemd-resolved is running
[ -e /run/systemd/system ] && \
systemctl is-active --quiet systemd-resolved.service &&
exit 0
case "$6" in
nm-*-service-*|/org/freedesktop/NetworkManager/PPP/*)
# NetworkManager handles it
exit 0
;;
esac
# create the file if it does not exist
if [ ! -e /etc/resolv.conf ]; then
: > /etc/resolv.conf
fi
# follow any symlink to find the real file
REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
# merge the new nameservers with the other options from the old configuration
{
echo '# PPP: This file was written by /etc/ppp/ip-up.d/0000usepeerdns.'
echo '# PPP: The following entries were obtained using PPP:'
cat /etc/ppp/resolv.conf
echo '# PPP: End of section rewritten by 0000usepeerdns.'
grep -vE "^(nameserver[[:space:]]|# PPP: )" "$REALRESOLVCONF" || true
} > "$REALRESOLVCONF.tmp"
# backup the old configuration and install the new one
cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"
mv -f "$REALRESOLVCONF.tmp" "$REALRESOLVCONF"
# restart nscd because resolv.conf has changed
if [ -e /var/run/nscd.pid ]; then
/etc/init.d/nscd restart || true
fi
exit 0