diff --git a/src/gen-networkd.c b/src/gen-networkd.c index 31bd9782b..133ab9878 100644 --- a/src/gen-networkd.c +++ b/src/gen-networkd.c @@ -178,6 +178,7 @@ write_wpa_unit(const NetplanNetDefinition* def, const char* generator_dir, gbool g_string_append(s, "DefaultDependencies=no\n"); g_string_append_printf(s, "Requires=sys-subsystem-net-devices-%s.device\n", stdouth); g_string_append_printf(s, "After=sys-subsystem-net-devices-%s.device\n", stdouth); + g_string_append(s, "Requires=netplan-configure.service\nAfter=netplan-configure.service\n"); g_string_append(s, "Before=network.target\nWants=network.target\n\n"); g_string_append(s, "[Service]\nType=simple\n"); g_string_append_printf(s, "ExecStart=/sbin/wpa_supplicant -c /run/netplan/wpa-%s.conf -i%s", stdouth, stdouth); diff --git a/tests/generator/base.py b/tests/generator/base.py index aac55648e..f9f57a03d 100644 --- a/tests/generator/base.py +++ b/tests/generator/base.py @@ -98,6 +98,8 @@ DefaultDependencies=no Requires=sys-subsystem-net-devices-%(iface)s.device After=sys-subsystem-net-devices-%(iface)s.device +Requires=netplan-configure.service +After=netplan-configure.service Before=network.target Wants=network.target