ifupdown: support "source-directory" stanza
authorBrandon Maier <brandon.maier@rockwellcollins.com>
Fri, 21 Sep 2018 17:54:05 +0000 (12:54 -0500)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 30 Sep 2018 11:23:05 +0000 (13:23 +0200)
commit14454b3071c7a5c053fde8eed416ab3b2f8475fb
treed24d35fc5b1a12e575202b79ebe1c89abb36d670
parentabfa3ec0598ff431407224c6b81682f7d0d35495
ifupdown: support "source-directory" stanza

Support the "source-directory" stanza from ifupdown[1]. source-directory
will include all files in the named directory. Similar to the Busybox
version of the "source" stanza, this version of source-directory does
not currently support shell wildcards.

We only check that the stanza starts with "source-dir" as ifupdown does[2].

[1] https://manpages.debian.org/stretch/ifupdown/interfaces.5.en.html#INCLUDING_OTHER_FILES
[2] https://salsa.debian.org/debian/ifupdown/blob/0.8.33/config.c#L498

function                                             old     new   delta
read_interfaces                                     1150    1241     +91

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/ifupdown.c