Interfaces have an implicit metric of 0.
authorScott Barker <scott@mostlylinux.ca>
Tue, 13 Nov 2018 15:02:44 +0000 (15:02 +0000)
committerRoy Marples <roy@marples.name>
Tue, 13 Nov 2018 15:02:44 +0000 (15:02 +0000)
resolvconf.in

index dd8797ef47c3f2876d98bd7aa185acfeff46dff7..3ee75a92175dc0cc7667b6cda3e3e6bbbaafd606 100644 (file)
@@ -461,13 +461,18 @@ list_resolv()
                                fi
                        done
                done
+               # Interfaces have an implicit metric of 0 if not specified.
+               for i in *; do
+                       if [ -f "$i" ] && ! [ -e "$METRICDIR/"*" $i" ]; then
+                               list="$list $i"
+                       fi
+               done
                if [ -d "$METRICDIR" ]; then
                        cd "$METRICDIR"
                        for i in *; do
                                [ -f "$i" ] && list="$list ${i#* }"
                        done
                fi
-               list="$list *"
        fi
 
        cd "$IFACEDIR"