Web lists-archives.com

Re: processing order for configuration files in /etc/network/interfaces.d




On Thu, Aug 23, 2018 at 6:04 PM <tomas@xxxxxxxxxx> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Thu, Aug 23, 2018 at 05:31:57PM +0300, Martin T wrote:
> > Hi!
> >
> > According to "man interfaces", the ifup brings the named interfaces up
> > in the order listed in /etc/network/interfaces file. However, what is
> > the order for files in /etc/network/interfaces.d/? Alphabetical, i.e
> > same as "ls -l /etc/network/interfaces.d/"?
>
> I assume the files there are invoked by run-parts (man interfaces(5) at
> least hints at that). In that case yes, they are run in lexical order.
>
> But I'd double-check the run-parts part (heh). I've been caught spewing
> nonsense here ;-)
>
> Cheers
> - -- tomás
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iEYEARECAAYFAlt+zN8ACgkQBcgs9XrR2kbV9wCeKwl3eILQA2d5rA6QgDKIIwQy
> 5scAn1NM68w35jLdQxrcD6F1dqCNpRpI
> =JRHj
> -----END PGP SIGNATURE-----
>

Tomas,

I added "pre-up echo $IFACE >> /tmp/interfaces_test" line to each
interface configuratio file in /etc/network/interfaces.d/ and looks
like the invoke order is not lexical. I have four files in
/etc/network/interfaces.d/:

# ls -l /etc/network/interfaces.d/
total 16
-rw-r--r-- 1 root root 338 Aug 26 14:10 br0
-rw-r--r-- 1 root root 555 Aug 26 14:10 eth0
-rw-r--r-- 1 root root  96 Aug 26 14:09 eth0.100
-rw-r--r-- 1 root root 109 Aug 26 14:09 lo
#

However, the content of the /tmp/interfaces_test is alwayse(I rebooted
the machine 5 times) following:

# cat /tmp/interfaces_test
br0
lo
eth0
eth0.100
#

I thought that ifup processes those files in order which they appear
in /etc/network/interfaces.d/*, but this does not seem to be true. Any
other ideas?


thanks,
Martin