kumquat-buildroot/package/ifupdown-scripts/network.service
Yann E. MORIN 5fb1b86782 package/ifupdown-scripts: new package
The ifupdown scripts can be used independently of the init system, be it
sysv, busybox or systemd; they could even be used when there is no init
system (i.e. the user is providing his own).

Currently, those ifupdown scripts are bundled in the skeleton.

But we soon will have a skeleton specific to systemd, so we would be
missing those scripts (when systemd-networkd is not enabled).

So, move those scripts to their own package.

To keep the current behaviour (before it is changed in future commits),
we make that package default to y, but depend on the default skeleton.

Instead of being a target-finalize hook, the scripts are installed as
any other package are, with a package install-target command.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: drop empty IFUPDOWN_SCRIPTS_SOURCE]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-04 23:38:18 +02:00

22 lines
601 B
Desktop File

[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
# lo is brought up earlier, which will cause the upcoming "ifup -a" to fail
# with exit code 1, due to an "ip: RTNETLINK answers: File exists" error during
# its "ip addr add ..." command, subsequently causing this unit to fail even
# though it is a benign error. Flushing the lo address with the command below
# before ifup prevents this failure.
ExecStart=/sbin/ip addr flush dev lo
ExecStart=/sbin/ifup -a
ExecStop=/sbin/ifdown -a
[Install]
WantedBy=multi-user.target