Add the inclusive_interfaces option to resolvoconf.conf to ignore the
authorRoy Marples <roy@marples.name>
Thu, 29 Dec 2016 21:51:22 +0000 (21:51 +0000)
committerRoy Marples <roy@marples.name>
Thu, 29 Dec 2016 21:51:22 +0000 (21:51 +0000)
exlusive marking for the listed interfaces.

resolvconf.conf.5.in
resolvconf.in

index 16b79ec222c0cd2924f0d1dee06268b81a0feb9a..fcebd864e367aea18719690dcb0f3b7cc5fb160f 100644 (file)
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 29, 2016
+.Dd December 29, 2016
 .Dt RESOLVCONF.CONF 5
 .Os
 .Sh NAME
@@ -69,6 +69,11 @@ If unset, defaults to the following:-
 These interfaces will be processed next, unless they have a metric.
 If unset, defaults to the following:-
 .D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
+.It Sy inclusive_interfaces
+Ignore any exlcusive marking for these interfaces.
+This is handy when 3rd party integrations force the
+.Nm resolvconf -x
+option and you want to disable it easily.
 .It Sy local_nameservers
 If unset, defaults to the following:-
 .D1 127.* 0.0.0.0 255.255.255.255 ::1
index b650c4a1184985752819a9da1e474add1b68d7f1..4e1b94fa2680f28f5268c2bd335f65336d7900d2 100644 (file)
@@ -403,6 +403,14 @@ list_resolv()
                        done
                fi
                excl=true
+               cd "$IFACEDIR"
+               for i in $inclusive_interfaces; do
+                       if [ -f "$i" -a "$list" = "$i" ]; then
+                               list=
+                               excl=false
+                               break
+                       fi
+               done
                ;;
        *)
                excl=false
@@ -443,7 +451,6 @@ list_resolv()
 
        cd "$IFACEDIR"
        retval=1
-       excl=true
        for i in $(uniqify $list); do
                # Only list interfaces which we really have
                if ! [ -f "$i" ]; then
@@ -457,8 +464,7 @@ list_resolv()
                if [ "$cmd" = i -o "$cmd" = "-i" ]; then
                        printf %s "$i "
                else
-                       echo_resolv "$i"
-                       echo
+                       echo_resolv "$i" && echo
                fi
                [ $? = 0 -a "$retval" = 1 ] && retval=0
        done