]> Frank Brehm's Git Trees - config/lena/etc.git/commitdiff
committing changes in /etc after apt run
authorFrank Brehm <frank@brehm-online.com>
Tue, 22 Nov 2016 14:33:12 +0000 (15:33 +0100)
committerFrank Brehm <frank@brehm-online.com>
Tue, 22 Nov 2016 14:33:12 +0000 (15:33 +0100)
Package changes:
+openresolv 3.8.0-1 amd64

.etckeeper
dhcp/dhclient-enter-hooks.d/resolvconf [new file with mode: 0644]
network/if-down.d/resolvconf [new file with mode: 0755]
network/if-up.d/000resolvconf [new file with mode: 0755]
ppp/ip-down.d/000resolvconf [new file with mode: 0755]
ppp/ip-up.d/000resolvconf [new file with mode: 0755]
resolvconf.conf [new file with mode: 0644]

index 37233058246fd89e7f56448ad9709a1a353049cf..52e05465b1f90ee63cf601479e9ffd1c0a72856e 100755 (executable)
@@ -217,6 +217,7 @@ maybe chmod 0755 'dhcp'
 maybe chmod 0644 'dhcp/debug'
 maybe chmod 0755 'dhcp/dhclient-enter-hooks.d'
 maybe chmod 0644 'dhcp/dhclient-enter-hooks.d/nodnsupdate'
+maybe chmod 0644 'dhcp/dhclient-enter-hooks.d/resolvconf'
 maybe chmod 0755 'dhcp/dhclient-exit-hooks.d'
 maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes'
 maybe chmod 0644 'dhcp/dhclient-exit-hooks.d/timesyncd'
@@ -495,11 +496,13 @@ maybe chmod 0644 'motd.tail'
 maybe chmod 0644 'nanorc'
 maybe chmod 0755 'network'
 maybe chmod 0755 'network/if-down.d'
+maybe chmod 0755 'network/if-down.d/resolvconf'
 maybe chmod 0755 'network/if-down.d/upstart'
 maybe chmod 0755 'network/if-post-down.d'
 maybe chmod 0755 'network/if-post-down.d/chrony'
 maybe chmod 0755 'network/if-pre-up.d'
 maybe chmod 0755 'network/if-up.d'
+maybe chmod 0755 'network/if-up.d/000resolvconf'
 maybe chmod 0755 'network/if-up.d/chrony'
 maybe chmod 0755 'network/if-up.d/mountnfs'
 maybe chmod 0755 'network/if-up.d/openssh-server'
@@ -543,8 +546,10 @@ maybe chmod 0644 'perl/Net/libnet.cfg'
 maybe chmod 0644 'perl/sitecustomize.pl'
 maybe chmod 0755 'ppp'
 maybe chmod 0755 'ppp/ip-down.d'
+maybe chmod 0755 'ppp/ip-down.d/000resolvconf'
 maybe chmod 0755 'ppp/ip-down.d/chrony'
 maybe chmod 0755 'ppp/ip-up.d'
+maybe chmod 0755 'ppp/ip-up.d/000resolvconf'
 maybe chmod 0755 'ppp/ip-up.d/chrony'
 maybe chmod 0644 'profile'
 maybe chmod 0755 'profile.d'
@@ -583,6 +588,7 @@ maybe chmod 0644 'reportbug.conf'
 maybe chmod 0644 'resolv.conf'
 maybe chmod 0644 'resolv.conf.dhcp'
 maybe chmod 0644 'resolv.conf.new'
+maybe chmod 0644 'resolvconf.conf'
 maybe chmod 0755 'rmt'
 maybe chmod 0644 'rpc'
 maybe chmod 0644 'rsyslog.conf'
diff --git a/dhcp/dhclient-enter-hooks.d/resolvconf b/dhcp/dhclient-enter-hooks.d/resolvconf
new file mode 100644 (file)
index 0000000..17c06be
--- /dev/null
@@ -0,0 +1,50 @@
+# resolvconf support for dhclient3
+
+NL="
+"
+
+if [ -x /sbin/resolvconf ]; then
+       case "$reason" in
+       BOUND|RENEW|REBIND|REBOOT|TIMEOUT)      
+               make_resolv_conf() {
+                       local nameserver conf=
+                       if [ -n "$new_domain_name" ]; then
+                               conf="${conf}domain $new_domain_name$NL"
+                       fi
+                       if [ -n "$new_domain_search" ]; then
+                               conf="${conf}search $new_domain_search$NL"
+                       fi
+                       for nameserver in $new_domain_name_servers; do
+                               conf="${conf}nameserver $nameserver$NL"
+                       done
+                       if [ -n "$conf" -a -n "$interface" ]; then
+                               conf="# resolv.conf for $interface$NL$conf"
+                               printf %s "$conf" | \
+                                       /sbin/resolvconf -a "$interface"
+                       fi
+               }
+               ;;
+       BOUND6|RENEW6|REBIND6)
+               make_resolv_conf() {
+                       local nameserver conf=
+                       if [ -n "$new_dhcp6_domain_search" ]; then
+                               conf="${conf}search $new_dhcp6_domain_search$NL"
+                       fi
+                       for nameserver in $new_dhcp6_name_servers; do
+                               conf="${conf}nameserver $nameserver$NL"
+                       done
+                       if [ -n "$conf" -a -n "$interface" ]; then
+                               conf="# resolv.conf for $interface$NL$conf"
+                               printf %s "$conf" | \
+                                       /sbin/resolvconf -a "$interface.inet6"
+                       fi
+               }
+               ;;
+       EXPIRE|FAIL|RELEASE|STOP)
+               [ -z "$interface" ] || /sbin/resolvconf -f -d "$interface"
+               ;;
+       EXPIRE6|RELEASE6|STOP6)
+               [ -z "$interface" ] || /sbin/resolvconf -f -d "$interface.inet6"
+               ;;
+       esac
+fi
diff --git a/network/if-down.d/resolvconf b/network/if-down.d/resolvconf
new file mode 100755 (executable)
index 0000000..acba208
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+# ifdown hook script for resolvconf
+# Written by Roy Marples <roy@marples.name> under the BSD-2 license
+
+[ -x /sbin/resolvconf ] || exit 0
+case "$ADDRFAM" in
+       inet|inet6) : ;;
+       *) exit 0;;
+esac
+[ "$METHOD" = dhcp ] && /sbin/resolvconf -f -d "$IFACE"
+/sbin/resolvconf -f -d "$IFACE.$ADDRFAM"
diff --git a/network/if-up.d/000resolvconf b/network/if-up.d/000resolvconf
new file mode 100755 (executable)
index 0000000..f8d079e
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+# ifup hook script for resolvconf
+# Written by Roy Marples <roy@marples.name> under the BSD-2 license
+
+[ -x /sbin/resolvconf ] || exit 0
+case "$ADDRFAM" in
+       inet|inet6) : ;;
+       *) exit 0;;
+esac
+
+conf=
+[ -n "$IF_DNS_DOMAIN" ] && conf="${conf}domain $IF_DNS_DOMAIN\n"
+[ -n "$IF_DNS_SEARCH" ] && conf="${conf}search $IF_DNS_SEARCH\n"
+[ -n "$IF_DNS_SORTLIST" ] && conf="${conf}sortlist $IF_DNS_SORTLIST\n"
+[ -n "$IF_DNS_OPTIONS" ] && conf="${conf}options $IF_DNS_OPTIONS\n"
+for nameserver in $IF_DNS_NAMESERVERS; do
+       conf="${conf}nameserver $nameserver\n"
+done
+if [ -n "$conf" ]; then
+       conf="# Generated by ifup for $IFACE.$ADDRFAM\n$conf"
+       printf "$conf" | /sbin/resolvconf -a "$IFACE.$ADDRFAM"
+fi
diff --git a/ppp/ip-down.d/000resolvconf b/ppp/ip-down.d/000resolvconf
new file mode 100755 (executable)
index 0000000..b4f26cb
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+# ppp.ip-down hook script for resolvconf
+# Written by Roy Marples <roy@marples.name> under the BSD-2 license
+
+[ -x /sbin/resolvconf ] || exit 0
+/sbin/resolvconf -f -d "$PPP_IFACE"
diff --git a/ppp/ip-up.d/000resolvconf b/ppp/ip-up.d/000resolvconf
new file mode 100755 (executable)
index 0000000..e2963c0
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# ppp.ip-up hook script for resolvconf
+# Written by Roy Marples <roy@marples.name> under the BSD-2 license
+
+[ -x /sbin/resolvconf ] || exit 0
+
+if [ -n "$DNS1" -o -n "$DNS2" ]; then
+       conf="# Generated by ppp.ip-up for $PPP_IFACE\n"
+       [ -n "$DNS1" ] && conf="${conf}nameserver $DNS1\n"
+       [ -n "$DNS2" ] && conf="${conf}nameserver $DNS2\n"
+       printf "$conf" | /sbin/resolvconf -a "$PPP_IFACE"
+fi
diff --git a/resolvconf.conf b/resolvconf.conf
new file mode 100644 (file)
index 0000000..1c03616
--- /dev/null
@@ -0,0 +1,13 @@
+# Configuration for resolvconf(8)
+# See resolvconf.conf(5) for details
+
+resolv_conf=/etc/resolv.conf
+# If you run a local name server, you should uncomment the below line and
+# configure your subscribers configuration files below.
+#name_servers=127.0.0.1
+
+# Mirror the Debian package defaults for the below resolvers
+# so that resolvconf integrates seemlessly.
+dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
+pdnsd_conf=/etc/pdnsd.conf
+unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf