OXIESEC PANEL
- Current Dir:
/
/
snap
/
core
/
17210
/
etc
/
ppp
/
ip-up.d
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/02/2024 07:52:55 PM
rwxr-xr-x
📄
0000usepeerdns
902 bytes
01/27/2016 04:19:52 PM
rwxr-xr-x
📄
000resolvconf
553 bytes
11/29/2017 06:26:46 PM
rwxr-xr-x
Editing: 0000usepeerdns
Close
#!/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 # 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 { cat /etc/ppp/resolv.conf grep --invert-match '^nameserver[[:space:]]' "$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