package/ifupdown-scripts: add openrc support
authorCarlos Santos <unixmania@gmail.com>
Mon, 9 Mar 2020 02:50:03 +0000 (23:50 -0300)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 11 Mar 2020 21:12:17 +0000 (22:12 +0100)
commit57f3685bc19d94e50b2e63463bc4a71ec2e0503f
tree8b12a9df8139ec261ad9554a951427d19842c650
parent48c73e0c5f840fc67adfa3ec58dba90768d384e9
package/ifupdown-scripts: add openrc support

The "network" script allows configuring an interface by means of two
/etc/ifup.<if_name> and /etc/ifdown.<if_name> files with the commands
required to bring it up and down, respectively. So we can support the
BR2_SYSTEM_DHCP config if netifrc is not selected.

- Replace the dependency on !BR2_PACKAGE_OPENRC in Config.in by a
  dependency on !BR2_PACKAGE_NETIFRC.

- Add an IFUPDOWN_SCRIPTS_DHCP_OPENRC macro to create the ifup.<if_name>
  and ifdown.<if_name> files.

- Add an IFUPDOWN_SCRIPTS_INSTALL_INIT_OPENRC hook that includes the
  IFUPDOWN_SCRIPTS_{PREAMBLE,DHCP,DHCP_OPENRC} macros. LOCALHOST is not
  required, since "lo" is configured by the "loopback" script.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
[yann.morin.1998@free.fr:
  - adapt after the preamble was spit to itw own patch
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/ifupdown-scripts/Config.in
package/ifupdown-scripts/ifupdown-scripts.mk