xref: /OK3568_Linux_fs/buildroot/package/ifupdown-scripts/network.service (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1[Unit]
2Description=Network Connectivity
3Wants=network.target
4Before=network.target
5
6[Service]
7Type=oneshot
8RemainAfterExit=yes
9
10# lo is brought up earlier, which will cause the upcoming "ifup -a" to fail
11# with exit code 1, due to an "ip: RTNETLINK answers: File exists" error during
12# its "ip addr add ..." command, subsequently causing this unit to fail even
13# though it is a benign error. Flushing the lo address with the command below
14# before ifup prevents this failure.
15ExecStart=/sbin/ip addr flush dev lo
16
17ExecStart=/sbin/ifup -a
18ExecStop=/sbin/ifdown -a
19
20[Install]
21WantedBy=multi-user.target
22