Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #199391

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

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: processing order for configuration files in /etc/network/interfaces.d
Date 2018-08-26 16:50 +0200
Message-ID <wr4wy-2ZP-15@gated-at.bofh.it> (permalink)
References <wpYWe-5bR-21@gated-at.bofh.it> <wpZpg-5AX-3@gated-at.bofh.it> <wr2Ep-1TO-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun 26 Aug 2018 at 15:41:05 (+0300), Martin T wrote:
> On Thu, Aug 23, 2018 at 6:04 PM <tomas@tuxteam.de> wrote:
> > On Thu, Aug 23, 2018 at 05:31:57PM +0300, Martin T wrote:
> > > 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 ;-)
> 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?

You need to post your evidence, starting with your /etc/network/interfaces
file. You say you're using ifup, so we can perhaps discount this paragraph:

       Currently, "source-directory" isn't supported by
       network-manager and guessnet.

but we don't know whether you're using "source-directory" or "source",
for example. The former might not be expected to run eth0.100 at all.
There's conflicting evidence on the web about such matters.

If you care about the order in which these files are sourced,
for the time being I would source them individually in the order you
want. I'm not sure where the lexical sorting is documented, but man
interfaces(5) does not yield much when searched for "lex", "sort"
and "order".

I'd be interested to find the script(s) that the system is using to
select configuration files for execution, and to see if it agrees
with the documentation (which is a bit lax here).

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

processing order for configuration files in /etc/network/interfaces.d Martin T <m4rtntns@gmail.com> - 2018-08-23 16:40 +0200
  Re: processing order for configuration files in  /etc/network/interfaces.d <tomas@tuxteam.de> - 2018-08-23 17:10 +0200
    Re: processing order for configuration files in /etc/network/interfaces.d Martin T <m4rtntns@gmail.com> - 2018-08-26 14:50 +0200
      Re: processing order for configuration files in  /etc/network/interfaces.d David Wright <deblis@lionunicorn.co.uk> - 2018-08-26 16:50 +0200
        Re: processing order for configuration files in /etc/network/interfaces.d Martin T <m4rtntns@gmail.com> - 2018-08-26 20:40 +0200
          Re: processing order for configuration files in  /etc/network/interfaces.d Zenaan Harkness <zenaan@freedbms.net> - 2018-08-27 04:40 +0200
          Re: processing order for configuration files in  /etc/network/interfaces.d <tomas@tuxteam.de> - 2018-08-27 10:20 +0200
            Re: processing order for configuration files in  /etc/network/interfaces.d Greg Wooledge <wooledg@eeg.ccf.org> - 2018-08-27 15:10 +0200
              Re: processing order for configuration files in  /etc/network/interfaces.d <tomas@tuxteam.de> - 2018-08-27 15:30 +0200
              Re: processing order for configuration files in  /etc/network/interfaces.d Reco <recoverym4n@gmail.com> - 2018-08-27 15:40 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d <tomas@tuxteam.de> - 2018-08-27 16:50 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d Reco <recoverym4n@gmail.com> - 2018-08-27 17:50 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d <tomas@tuxteam.de> - 2018-08-27 17:50 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d Greg Wooledge <wooledg@eeg.ccf.org> - 2018-08-27 18:10 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d Reco <recoverym4n@gmail.com> - 2018-08-27 18:30 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d David Wright <deblis@lionunicorn.co.uk> - 2018-08-27 18:50 +0200
                Re: processing order for configuration files in  /etc/network/interfaces.d Reco <recoverym4n@gmail.com> - 2018-08-27 19:40 +0200
          Re: processing order for configuration files in  /etc/network/interfaces.d David Wright <deblis@lionunicorn.co.uk> - 2018-08-28 15:30 +0200
  Re: processing order for configuration files in  /etc/network/interfaces.d Badiane Ka <badiane_ka@yahoo.com> - 2018-08-29 17:50 +0200

csiph-web