network: fix waiting for VM network uplink
The network-uplink-wait.sh script may be called before xen-netfront module is even loaded (by udev). In that case, `get_qubes_managed_iface` will fail to get the interface name and the wait will be skipped. Fix this by loading xen-netfront module explicitly (do not try to synchronize with udev, which is tricky not knowing the device name).
This commit is contained in:
parent
ba4e7f853d
commit
d602da4ae9
@ -138,6 +138,12 @@ get_qubes_managed_iface() {
|
|||||||
local mac
|
local mac
|
||||||
local qubes_iface
|
local qubes_iface
|
||||||
mac="$(qubesdb-read /qubes-mac 2> /dev/null)"
|
mac="$(qubesdb-read /qubes-mac 2> /dev/null)"
|
||||||
|
if [ -z "$mac" ]; then
|
||||||
|
# no qubes-managed network interface
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
# Load the module explicitly here, to avoid waiting for udev doing that
|
||||||
|
[ -e /sys/module/xen_netfront ] || modprobe xen-netfront || :
|
||||||
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user