Debian Codegraph @

debian/extra/ip-down.d/0000usepeerdns

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`. -e
2
3 # exit if the resolvconf package is installed
4 [scip-shell system . . `[`. -x /sbin/resolvconfscip-shell filesystem . . `/sbin/resolvconf`. ] && exit 0
5
6 # exit if systemd-resolved is running
7 [scip-shell system . . `[`. -e /run/systemd/systemscip-shell filesystem . . `/run/systemd/system`. ] && \
8 systemctl is-active --quiet systemd-resolved.service &&
9 exit 0
10
11 # follow any symlink to find the real file
12 if [scip-shell system . . `[`. -e /etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`. ]; then
13 REALRESOLVCONF=$(readlinkscip-shell system . . readlink. --canonicalize /etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`.)
14 else
15 REALRESOLVCONF=/etc/resolv.confscip-shell filesystem . . `/etc/resolv.conf`.
16 fi
17
18 # if an old resolv.conf file exists, restore it
19 if [scip-shell system . . `[`. -e $REALRESOLVCONF.pppd-backup.$PPP_IFACE ]; then
20 mvscip-shell system . . mv. -f $REALRESOLVCONF.pppd-backup.$PPP_IFACE $REALRESOLVCONF
21
22 # restart nscd because resolv.conf has changed
23 if [scip-shell system . . `[`. -e /var/run/nscd.pidscip-shell filesystem . . `/var/run/nscd.pid`. ]; then
24 /etc/init.d/nscdscip-shell filesystem . . `/etc/init.d/nscd`. restart || truescip-shell system . . true.
25 fi
26 fi
27
28 exit 0