libsystemd-network: use udev_available()

This commit is contained in:
Nick Rosbrook
2022-06-08 18:32:37 -04:00
parent 4f62dc3e92
commit bfe2e67f25
+1 -2
View File
@@ -11,7 +11,6 @@
#include "netif-util.h"
#include "siphash24.h"
#include "sparse-endian.h"
#include "stat-util.h"
#include "string-table.h"
#include "udev-util.h"
@@ -213,7 +212,7 @@ int dhcp_identifier_set_iaid(
uint64_t id;
int r;
if (path_is_read_only_fs("/sys") <= 0 && !use_mac) {
if (udev_available() && !use_mac) {
/* udev should be around */
r = sd_device_new_from_ifindex(&device, ifindex);