|
@@ -32,8 +32,19 @@ define NETIFRC_REMOVE_UDEV
|
|
endef
|
|
endef
|
|
endif # BR2_PACKAGE_HAS_UDEV
|
|
endif # BR2_PACKAGE_HAS_UDEV
|
|
|
|
|
|
|
|
+NETIFRC_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
|
|
|
|
+ifneq ($(NETIFRC_DHCP_IFACE),)
|
|
|
|
+NETIFRC_DHCP_CFG = config_$(NETIFRC_DHCP_IFACE)="dhcp"
|
|
|
|
+define NETIFRC_DHCP_SERVICE
|
|
|
|
+ ln -sf net.lo $(TARGET_DIR)/etc/init.d/net.$(NETIFRC_DHCP_IFACE)
|
|
|
|
+ ln -sf /etc/init.d/net.$(NETIFRC_DHCP_IFACE) \
|
|
|
|
+ $(TARGET_DIR)/etc/runlevels/default/net.$(NETIFRC_DHCP_IFACE)
|
|
|
|
+endef
|
|
|
|
+endif # BR2_SYSTEM_DHCP != ""
|
|
|
|
+
|
|
define NETIFRC_NET_CFG
|
|
define NETIFRC_NET_CFG
|
|
config_lo="127.0.0.1/8"
|
|
config_lo="127.0.0.1/8"
|
|
|
|
+ $(NETIFRC_DHCP_CFG)
|
|
endef
|
|
endef
|
|
|
|
|
|
define NETIFRC_INSTALL_TARGET_CMDS
|
|
define NETIFRC_INSTALL_TARGET_CMDS
|
|
@@ -41,6 +52,7 @@ define NETIFRC_INSTALL_TARGET_CMDS
|
|
$(NETIFRC_REMOVE_UDEV)
|
|
$(NETIFRC_REMOVE_UDEV)
|
|
$(call PRINTF,$(NETIFRC_NET_CFG)) > $(TARGET_DIR)/etc/conf.d/net
|
|
$(call PRINTF,$(NETIFRC_NET_CFG)) > $(TARGET_DIR)/etc/conf.d/net
|
|
ln -sf /etc/init.d/net.lo $(TARGET_DIR)/etc/runlevels/default/net.lo
|
|
ln -sf /etc/init.d/net.lo $(TARGET_DIR)/etc/runlevels/default/net.lo
|
|
|
|
+ $(NETIFRC_DHCP_SERVICE)
|
|
endef
|
|
endef
|
|
|
|
|
|
$(eval $(generic-package))
|
|
$(eval $(generic-package))
|