[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What should I put inside the file called wlan0?



On Thu 03 Mar 2022 at 19:44:35 (+0100), Stella Ashburne wrote:
> From: "David Wright" <deblis@lionunicorn.co.uk>
> >
> > In addition, when using "source-directory"¹, you can leave all the
> > configuration files in place, and deactivate them by, say, adding
> > a disallowed character to their filenames, rather than having to
> > remove them.
> > 
> Can you give me an example of (sic) adding a disallowed character to their filenames? Does Linux permit the use of forbidden characters in filenames?
> 
> > BTW, I would add that, though I have a reputation with the OP for
> > not recommending man pages,
> > 
> Most of the man pages don't provide an example for each option or argument mentioned therein.

I would maintain that the examples in   man interfaces
and /usr/share/doc/ifupdown/examples/network-interfaces
cover the area pretty well, assuming you're actually
using ifupdown (which you disputed at one point).

> >   But one of my first actions on any new
> >   installation is to overwrite the networking files.
> > 
> Would you like to elaborate please?

Frequently, I have installed wireless machines with ethernet,
which leaves behind an /e/n/i file for ifupdown to read. Up
until buster, I used wicd to configure the network (both wifi
and wired), so I would immediately overwrite /e/n/i with:

$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
$ 

otherwise wicd will think that some other application is
configuring any interfaces contained therein.

The upshot is that I don't have an unmodified copy of
/e/n/i to check on my statement re source/source-directory.
What I did check was /var/lib/dpkg/info/ifupdown.postinst,
which is alleged to create the file during instalation.

$ diff -U0 /tmp/bull/ifupdown.postinst /tmp/bust/ifupdown.postinst 
--- /tmp/bull/ifupdown.postinst 2020-11-04 00:37:13.000000000 -0600
+++ /tmp/bust/ifupdown.postinst 2019-01-28 14:37:33.000000000 -0600
@@ -23 +23 @@
-      echo "source /etc/network/interfaces.d/*" >> /etc/network/interfaces
+      echo "source-directory /etc/network/interfaces.d" >> /etc/network/interfaces
@@ -30 +30 @@
-# Automatically added by dh_installdeb/13.2.1
+# Automatically added by dh_installdeb/12
@@ -41 +41 @@
-# Automatically added by dh_installinit/13.2.1
+# Automatically added by dh_installinit/12
@@ -48 +48 @@
-# Automatically added by dh_installsystemd/13.2.1
+# Automatically added by dh_installsystemd/12
@@ -65 +65 @@
-# Automatically added by dh_installsystemd/13.2.1
+# Automatically added by dh_installsystemd/12
$ 

Cheers,
David.


Reply to: