eth0
是否有可能为中说/etc/network/interfaces.d/eth0.cfg
和中部分有一个接口定义/etc/network/interfaces
?
如果可能的话,优先权哪一个更胜一筹?
答案1
我的提示来自https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1235169。请参阅#1 评论。/etc/network/interfaces
然后您可以在下面看到/etc/network/interfaces.d
。
read_interfaces_defn(..., '/etc/network/interfaces'
Reading directory /etc/network/interfaces.d
Parsing file eth0
read_interfaces_defn(..., 'eth0') failed in directory '/root'
Parsing file eth1
read_interfaces_defn(..., 'eth1') failed in directory '/root'
Parsing file eth2
read_interfaces_defn(..., 'eth2') failed in directory '/root'
Parsing file eth3
read_interfaces_defn(..., 'eth3') failed in directory '/root'
Parsing file eth4
read_interfaces_defn(..., 'eth4') failed in directory '/root'
Parsing file lo
read_interfaces_defn(..., 'lo') failed in directory '/root'
run-parts --verbose /etc/network/if-pre-up.d
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/postfix
run-parts: executing /etc/network/if-up.d/upstart
也可以从这里的堆栈跟踪https://github.com/mitchellh/vagrant/issues/1092你可以看到它会抱怨重复。
/etc/network/interfaces:17: duplicate interface
ifup: couldn't read interfaces file "/etc/network/interfaces"