# Update domain name server IPv6 addresses and # restart radvd on reconfiguration of the interface. RESOLV_CONF="/etc/resolv.conf" RADVD_CONF="/tmp/radvd.conf" RADVD_CONF_TEMPLATE="/etc/radvd.conf" if $if_configured; then [ ! -f "$RESOLV_CONF" ] && return # Filter resolv.conf to get the IPv6 name servers # only. dns=$(grep -F nameserver $RESOLV_CONF | cut -c 12- | grep -E "^[0-9]*:") cat $RADVD_CONF_TEMPLATE \ | sed "s!%%DNS%%!$dns!" \ > $RADVD_CONF chmod a+r "$RADVD_CONF" service radvd --ifstarted restart fi