#
################################################################################
+define IFUPDOWN_SCRIPTS_PREAMBLE
+ echo "# interface file auto-generated by buildroot" \
+ > $(TARGET_DIR)/etc/network/interfaces
+endef
+
define IFUPDOWN_SCRIPTS_LOCALHOST
( \
- echo "# interface file auto-generated by buildroot"; \
echo ; \
echo "auto lo"; \
echo "iface lo inet loopback"; \
- ) > $(TARGET_DIR)/etc/network/interfaces
+ ) >> $(TARGET_DIR)/etc/network/interfaces
endef
IFUPDOWN_SCRIPTS_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
define IFUPDOWN_SCRIPTS_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 $(IFUPDOWN_SCRIPTS_PKGDIR)/S40network \
$(TARGET_DIR)/etc/init.d/S40network
+ $(IFUPDOWN_SCRIPTS_PREAMBLE)
$(IFUPDOWN_SCRIPTS_LOCALHOST)
$(IFUPDOWN_SCRIPTS_DHCP)
endef
define IFUPDOWN_SCRIPTS_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 $(IFUPDOWN_SCRIPTS_PKGDIR)/network.service \
$(TARGET_DIR)/etc/systemd/system/network.service
+ $(IFUPDOWN_SCRIPTS_PREAMBLE)
$(IFUPDOWN_SCRIPTS_LOCALHOST)
$(IFUPDOWN_SCRIPTS_DHCP)
endef