aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/systemd/systemd.mk9
-rw-r--r--system/Config.in9
2 files changed, 12 insertions, 6 deletions
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 278c8e93cc..fce5d8411c 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -281,6 +281,14 @@ define SYSTEMD_INSTALL_RESOLVCONF_HOOK
ln -sf ../run/systemd/resolve/resolv.conf \
$(TARGET_DIR)/etc/resolv.conf
endef
+SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
+ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
+define SYSTEMD_INSTALL_NETWORK_CONFS
+ sed s/SYSTEMD_NETWORKD_DHCP_IFACE/$(SYSTEMD_NETWORKD_DHCP_IFACE)/ \
+ package/systemd/dhcp.network > \
+ $(TARGET_DIR)/etc/systemd/network/dhcp.network
+endef
+endif
else
SYSTEMD_CONF_OPTS += --disable-networkd
define SYSTEMD_INSTALL_SERVICE_NETWORK
@@ -383,6 +391,7 @@ define SYSTEMD_INSTALL_INIT_SYSTEMD
$(SYSTEMD_INSTALL_SERVICE_TTY)
$(SYSTEMD_INSTALL_SERVICE_NETWORK)
$(SYSTEMD_INSTALL_SERVICE_TIMESYNC)
+ $(SYSTEMD_INSTALL_NETWORK_CONFS)
endef
$(eval $(autotools-package))
diff --git a/system/Config.in b/system/Config.in
index 875ed376bf..3ddf8433d4 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -372,7 +372,7 @@ config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
config BR2_SYSTEM_DHCP
string "Network interface to configure through DHCP"
default ""
- depends on !BR2_PACKAGE_SYSTEMD_NETWORKD && (BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN)
+ depends on BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || BR2_PACKAGE_SYSTEMD_NETWORKD
help
Enter here the name of the network interface (E.G. eth0) to
automatically configure through DHCP at bootup.
@@ -382,11 +382,8 @@ config BR2_SYSTEM_DHCP
For more complicated network setups use an overlay to overwrite
/etc/network/interfaces or add a networkd configuration file.
-comment "automatic network configuration via DHCP is not compatible with networkd"
- depends on BR2_PACKAGE_SYSTEMD_NETWORKD
-
-comment "automatic network configuration via DHCP needs ifupdown or busybox"
- depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN)
+comment "automatic network configuration via DHCP needs ifupdown or busybox or networkd"
+ depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || BR2_PACKAGE_SYSTEMD_NETWORKD)
endif # BR2_ROOTFS_SKELETON_DEFAULT