Netcfg.service failing.

系统有两块网卡,之前参照Wiki的方法建立udev规则指定了网卡顺序。自从换了SSD硬盘做系统盘,加上换用systemd,发现基本上每次开机netcfg都启动失败,手动netcfg 或者立即重新启动一次,就能正常。推测是启动进度快netcfg时候网卡还没有就绪,搜解决办法,发现:https://bbs.archlinux.org/viewtopic.php?pid=1154512

$ cat /etc/systemd/system/network.service 
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
After=sys-devices-pci0000:00-0000:00:1c.1-0000:02:00.0-bcma0:0-net-wlan0.device
BindTo=sys-devices-pci0000:00-0000:00:1c.1-0000:02:00.0-bcma0:0-net-wlan0.device
按照这样的格式,从/sys/devices中找到设备名修改,问题解决。

cat /etc/systemd/system/netcfg.service 
[Unit]
Description=Netcfg multi-profile daemon
Before=network.target
After=sys-devices-pci0000:00:1c.1-0000:03:00.0-net-net0.service
BindTo=sys-devices-pci0000:00:1c.1-0000:03:00.0-net-net0.service

你可能感兴趣的:(Netcfg.service failing.)