package/ifupdown-scripts: relocate the generation the interfaces file
authorCarlos Santos <unixmania@gmail.com>
Mon, 9 Mar 2020 02:50:02 +0000 (23:50 -0300)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 11 Mar 2020 21:12:17 +0000 (22:12 +0100)
Generate it in the IFUPDOWN_SCRIPTS_INSTALL_INIT_<FOO> hook. This will
allow creating a file to configure an interface via DHCP for the openrc
network service, in a forthcoming change.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/ifupdown-scripts/ifupdown-scripts.mk

index d387c530f1cbdb02ea1cf7015cbaf94f19f6667f..16fef783dd5579477f57b5c9e76e0e633434de3d 100644 (file)
@@ -32,13 +32,13 @@ define IFUPDOWN_SCRIPTS_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0755 -D $(IFUPDOWN_SCRIPTS_PKGDIR)/nfs_check \
                $(TARGET_DIR)/etc/network/nfs_check
        $(call SYSTEM_RSYNC,$(IFUPDOWN_SCRIPTS_PKGDIR)/network,$(TARGET_DIR)/etc/network)
-       $(IFUPDOWN_SCRIPTS_LOCALHOST)
-       $(IFUPDOWN_SCRIPTS_DHCP)
 endef
 
 define IFUPDOWN_SCRIPTS_INSTALL_INIT_SYSV
        $(INSTALL) -D -m 0755 $(IFUPDOWN_SCRIPTS_PKGDIR)/S40network \
                $(TARGET_DIR)/etc/init.d/S40network
+       $(IFUPDOWN_SCRIPTS_LOCALHOST)
+       $(IFUPDOWN_SCRIPTS_DHCP)
 endef
 
 # ifupdown-scripts can not be selected when systemd-networkd is
@@ -47,6 +47,8 @@ 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_LOCALHOST)
+       $(IFUPDOWN_SCRIPTS_DHCP)
 endef
 
 $(eval $(generic-package))