I already add this service to startup with systemctl enable netcfg
,
here's contents of /etc/conf.d/network
,
NETWORKS=(eth0 eth1)
WIRED_INTERFACE="eth0"
WIRELESS_INTERFACE="wlan0"
AUTO_PROFILES=(eth0 eth1)
And contents of netcfg.service:
[root@localhost ~]# cat /etc/systemd/system/multi-user.target.wants/netcfg.service
[Unit]
Description=Netcfg multi-profile daemon
Before=network.target
Wants=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/netcfg-daemon start
ExecStop=/usr/bin/netcfg-daemon stop
KillMode=none
[Install]
WantedBy=multi-user.target
journalctl logs of netcfg:
Oct 29 XXXXXX localhost netcfg-daemon[182]: No recorded netcfg state to restore
Oct 29 XXXXXX localhost systemd[1]: netcfg.service: main process exited, code=exited, status=1/FAILURE
Oct 29 XXXXXX localhost systemd[1]: Failed to start Netcfg multi-profile daemon.
Oct 29 XXXXXX localhost systemd[1]: Unit netcfg.service entered failed state
It doesn't work (works randomly?), the output says netcfg
failed, but invoke it manually works, why?