Răsfoiți Sursa

init/functions: do not guess 'eth0' as Qubes-managed interface

... if it doesn't exist.
The /qubes-mac qubesdb entry is present on Qubes 4.1, but not 4.0. It is
ok to depend on it here, but keep safer fallback if this code would need
to be backported.
Marek Marczykowski-Górecki 3 ani în urmă
părinte
comite
519e82b7c0
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      init/functions

+ 1 - 1
init/functions

@@ -141,7 +141,7 @@ get_qubes_managed_iface() {
     qubes_iface="$(get_iface_from_mac "$mac")"
     qubes_iface="$(get_iface_from_mac "$mac")"
     if [ "x$qubes_iface" != "x" ]; then
     if [ "x$qubes_iface" != "x" ]; then
         echo "$qubes_iface"
         echo "$qubes_iface"
-    else
+    elif [ -e /sys/class/net/eth0 ]; then
         echo eth0
         echo eth0
     fi
     fi
 }
 }