[Buildroot] [PATCH v2] skeleton: /etc/network/interface.d/* support
Peter Korsgaard
peter at korsgaard.com
Sun Oct 23 12:06:12 UTC 2016
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:
Hi,
> Sorry for the late answer. I believe none of this should go in the main
> skeleton, as it is really specific to ifupdown.
Indeed. From what I can see, the busybox applet doesn't support
wildcards in the source lines (and doesn't support source-directory).
What is the reason to use source with a wildcard instead of
source-directory? From the man page:
source interfaces.d/machine-dependent
source-directory interfaces.d
It does say though:
Currently, "source-directory" isn't supported by network-manager and guessnet.
By default, on a freshly installed Debian system, the interfaces file
includes a line to source files in the /etc/network/interfaces.d
directory.
>From the postinst script:
if [ ! -f /etc/network/interfaces ] ; then
if [ -z "$2" ]; then
echo "Creating /etc/network/interfaces."
echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > /etc/network/interfaces
echo "# Include files from /etc/network/interfaces.d:" >> /etc/network/interfaces
echo "source-directory /etc/network/interfaces.d" >> /etc/network/interfaces
> adding the following in ifupdown.mk:
> ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)
> define IFUPDOWN_TUNE_ETC_NETWORK_INTERFACES
> mkdir -p $(TARGET_DIR)/etc/network/interfaces.d
> echo "source interfaces.d/*" >> $(TARGET_DIR)/etc/network/interfaces
> endef
> IFUPDOWN_TARGET_FINALIZE_HOOKS += IFUPDOWN_TUNE_ETC_NETWORK_INTERFACES
We afaik provide no explicit guarantees on the ordering of the various
_TARGET_FINALIZE hooks, but it afaik will run in (package-)alphabetical
order, E.G. before the finalize hooks of skeleton so this doesn't work
:/
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list