Error reading file /etc/network/interfaces: unexpected line 'source-directory /etc/network/interfaces.d'

As information only, I’ve a fresh Debian 11 installation from August 2022 and also I had the below lines

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# Cloud images dynamically generate config fragments for newly
# attached interfaces. See /etc/udev/rules.d/75-cloud-ifupdown.rules
# and /etc/network/cloud-ifupdown-helper. Dynamically generated
# configuration fragments are stored in /run:
source-directory /run/network/interfaces.d

I solved the problems with Dashboard by changing it to one line with

source /run/network/interfaces.d/*

Hi @nikkio

I’m also on OVH, having a VM! and I had the same 2 lines. So is it an OVH issue? I installed Debian 11 using the OVH script.

I think is a mix of two, OVH making weird config and Webmin not handling well this exception.
I am reading that Webmin staff already found a fix, or at least they are close.

The fact that we get stuck in an infinite loop on an unrecognized directive is obviously a bug, which will be fixed in the next Webmin release. The Solution comment in this thread provides a simple workaround.

I just realized the two source-directory two lines are not identical. Damn.

That explains a lot.

1 Like

Cool! run and etc. And noone seen it!

Hi! I was just about to point that out. Is your solution still valid given this? I followed your instructions yesterday and it fixed the problem but I wonder if it can cause any side effect.

Yes, I noticed that and I choosed to downgrade Webmin instead of comment the line.

I’m waiting for the next release.

The solution comment has been edited to reflect the new information.

Webmin continues to not be able to parse source-directory and fails in an uncomfortable way (infinite loop), and we’re waiting on an update to fix that. If you want to work around that problem, you can change it to use source syntax, instead, which Webmin does recognize.

This does not really solve the issue. I’m running Virtualmin on Debian 11 on an AWS EC2 instance. Doing so kills the accessibility of the instance because AWS puts some network files in these directories on the fly at boot time.
We need a new vesion which doen’t reacts to these lines.


Are you sure you’re talking about the updated information? You have both lines converted from source-directory to source syntax (with an /* on the end, so it gets all the files in that dir), and that doesn’t work? I can’t image why it wouldn’t…they are functionally the same in the network configuration scripts, as far as I can tell.

But, we’re working on a new version. 2.013 should be out soon with this fix and a couple others.

Yes I’m sure, you can try it using the AWSfree tier.

  • Launch a AWS Debian 11 EC2C instance (create a key ring if newver did it)
  • Access the instance using SSH
  • Modify the two lines.
  • Reboot

and you’ll see one error on your EC2 dashboard, if you ask for the detail it says Accessibility. And if you try to access again the EC2 intance you can’t, there’s no way to get in, no console access not even SSH access from another EC that is on the same subnet same data center using the private IP. You’re stuck outside.

1 Like

Dang. That’s awful. Sorry for leading you astray on this. I can’t imagine why it wouldn’t be able to work with source instead of source-directory. But, new Webmin with this fix is syncing now, so updating to 2.013 should resolve it.

Let me check again… To be sure

Sorry I forgot the /*, I was wrong you were right.

How to I get the 2.013 ? Website still says 7.5 for the deb.

It should be available now, just refresh available packages in the software updates page.

7.5 is Virtualmin virtual-server module, not Webmin.

Thanks a lot for your quick replies !

On another subject may I suggest renaming the Import database in Reclaim, the word Import with database leads to confusion with the MySQL (or PostgreSQL) import function.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.