|
@@ -1,5 +1,9 @@
|
|
|
#!/bin/sh
|
|
|
|
|
|
+# Source Qubes library.
|
|
|
+# shellcheck source=init/functions
|
|
|
+. /usr/lib/qubes/init/functions
|
|
|
+
|
|
|
NM_CONFIG_DIR=/etc/NetworkManager/system-connections
|
|
|
if [ -d $NM_CONFIG_DIR ] && [ ! -h $NM_CONFIG_DIR ]; then
|
|
|
mkdir -p /rw/config/NM-system-connections
|
|
@@ -20,7 +24,7 @@ sed -r -i -e "s/^#?plugins=.*/plugins=keyfile/" /etc/NetworkManager/NetworkManag
|
|
|
# starting NetworkManager, otherwise it will try default DHCP configuration
|
|
|
# first and only after a timeout fallback to static one - introducing delay in
|
|
|
# network connectivity
|
|
|
-export INTERFACE=eth0
|
|
|
+export INTERFACE="$(get_qubes_managed_iface)"
|
|
|
if qubesdb-read /qubes-ip >/dev/null 2>/dev/null &&
|
|
|
[ -e /sys/class/net/$INTERFACE ] &&
|
|
|
[ ! -r /etc/NetworkManager/system-connections/qubes-uplink-$INTERFACE ]; then
|