systemd 在 Debian 8.0 Jessie 启动时等待网络的时间太长

Neu*_*ter 9 networking boot debian upgrade systemd

我的系统在运行 Debian 7 Wheezy 时启动速度相对较快,但在升级到 Debian 8 Jessie 后,因此从SysVinitsystemd,它变得更慢了。

减慢启动速度的是网络。等待网口培养时间超过1分钟。我不知道是什么/etc/network/interfaces影响了启动过程,所以这里是完整的。

/etc/network/interfaces

allow-auto lo
        iface lo inet loopback

auto wlan0
        iface wlan0 inet static
                address 192.168.150.1
                netmask 255.255.255.0

auto eth1
        iface eth1 inet manual
                up ifconfig $IFACE 0.0.0.0 up
                down ifconfig $IFACE down

auto eth2
        iface eth2 inet manual
                up ifconfig $IFACE 0.0.0.0 up
                down ifconfig $IFACE down

auto eth0
        iface eth0 inet dhcp
                post-up brctl addbr br0
                post-up brctl addif br0 eth1 eth2
                post-up ifconfig br0 192.168.10.1
                pre-down ifconfig br0 0.0.0.0
                pre-down brctl delif br0 eth1 eth2
                pre-down ifconfig br0 down
                pre-down brctl delbr br0
Run Code Online (Sandbox Code Playgroud)

任何建议如何提升事情?

Neu*_*ter 12

解决方案相当简单,只需替换autoallow-hotplug. 所以我最终得到了这个:

allow-hotplug lo
        iface lo inet loopback

allow-hotplug wlan0
        iface wlan0 inet static
                address 192.168.150.1
                netmask 255.255.255.0

allow-hotplug eth1
        iface eth1 inet manual
                up ifconfig $IFACE 0.0.0.0 up
                down ifconfig $IFACE down

allow-hotplug eth2
        iface eth2 inet manual
                up ifconfig $IFACE 0.0.0.0 up
                down ifconfig $IFACE down

allow-hotplug eth0
        iface eth0 inet dhcp
                post-up brctl addbr br0
                post-up brctl addif br0 eth1 eth2
                post-up ifconfig br0 192.168.10.1
                pre-down ifconfig br0 0.0.0.0
                pre-down brctl delif br0 eth1 eth2
                pre-down ifconfig br0 down
                pre-down brctl delbr br0
Run Code Online (Sandbox Code Playgroud)

现在系统启动非常快。