[Letux-kernel] [Tinkerphones] default for Debian /etc/network/interfaces

H. Nikolaus Schaller hns at goldelico.com
Fri Feb 24 08:05:58 CET 2017


> Am 23.02.2017 um 22:49 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi Jonas,
> 
>> Am 23.02.2017 um 16:31 schrieb Jonas Smedegaard <jonas at jones.dk>:
>> 
>> Quoting H. Nikolaus Schaller (2017-02-23 15:51:34)
>>> Hi Jonas,
>>> 
>>>> Am 23.02.2017 um 14:33 schrieb Jonas Smedegaard <jonas at jones.dk>:
>>>> 
>>>> Quoting H. Nikolaus Schaller (2017-02-23 13:58:23)
>>>>> Hi Jonas,
>>>>> despite the production issues I am working a little on improving
>>>>> our Debian default rootfs for the GTA04.
>>>>> 
>>>>> I just found out recently that there is a rarely known capability
>>>>> to define /etc/network/interfaces.d/* files which can be sourced
>>>>> by the master /e/n/i.
>>>>> 
>>>>> This would solve the issue that we do a hard overwrite of /e/n/i
>>>>> to configure the usb0 ethernet gadget and real ethernet on boards
>>>>> which have hardware (BeagleBoard XM, PandaBoard, OMAP5EVM) right
>>>>> after building the debootstrap.
>>>>> 
>>>>> Instead, we could just add specific config files for the 2 or 3
>>>>> interfaces we have in our letux devices with low risk of overwriting
>>>>> anything else. And if they interfere they can easily be removed.
>>>>> 
>>>>> But I could not find the default version of /e/n/i installed
>>>>> during debootstrap to check if it really sources the eni.d.
>>>>> Debian Packages search (on the web) shows no package where it is contained.
>>>>> 
>>>>> So how is this file created during debootstrap?
>>>> 
>>>> I believe debootstrap does *not* create the file /etc/network/interfaces
>>>> - like hosts.conf and a few other core files it need manual creation if
>>>> not using debian-installer.
>>> 
>>> Ah, ok. I see. Maybe I have to find out by experiment... It shouldn't be
>>> difficult to debootstrap a new system on the GTA04 (I think I already have
>>> a script for this).
> 
> Ok, I did run on the gta04:
> 
> mkdir /debian
> debootstrap --arch armhf stretch /debian/ http://ftp.us.debian.org/debian
> 
> and now I have:
> 
> root at letux:~# ls -l /debian/etc/network
> total 24
> drwxr-xr-x 2 root root 4096 Feb 23 21:00 if-down.d
> drwxr-xr-x 2 root root 4096 Jan 30 13:32 if-post-down.d
> drwxr-xr-x 2 root root 4096 Jan 30 13:32 if-pre-up.d
> drwxr-xr-x 2 root root 4096 Feb 23 21:00 if-up.d
> -rw-r--r-- 1 root root  142 Feb 23 21:00 interfaces
> drwxr-xr-x 2 root root 4096 Jan 30 13:32 interfaces.d
> root at letux:~# cat /debian/etc/network/interfaces
> # interfaces(5) file used by ifup(8) and ifdown(8)
> # Include files from /etc/network/interfaces.d:
> source-directory /etc/network/interfaces.d
> root at letux:~#
> 
> So there is a fresh /e/n/i and /e/n/i.d created and it is set up to source
> the /e/n/i.d
> 
> That is fine and like I hoped! So we can provide letux-usb0 or letux-eth0
> network configs for single interfaces so that e.g. USB networking works
> out of the box even if you have no GUI.
> 
> Next I will check if that is already a feature of Jessie or was introduced
> in Stretch.

Ok, here is the result:

- Wheezy only creates /e/n/i with "auto lo"
- Jessie and Stretch both create empty /e/n/i.d and /e/n/i with only "source-directory /e/n/i.d"

So it was already introduced in Jessie.

Since it is very unlikely that anyone still wants to use Wheezy on the GTA04
it will work when using the default for /e/n/i and patching letux interfaces to
/e/n/i.d

Specifically I want to make those interface configs part of the letux-kernel,
so that they are maintained in Letux/etc/network and kept in sync with kernel
interface naming (this sometimes changed in the past).

BR,
Nikolaus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170224/11d10390/attachment.asc>


More information about the Letux-kernel mailing list