[arch-general] systemd network configuration

Tom Gundersen teg at jklm.no
Thu Jul 26 06:36:10 EDT 2012

On Thu, Jul 26, 2012 at 5:05 AM, David Benfell
<benfell at parts-unknown.org> wrote:
> I have no evidence that it actually runs. If nothing else, I would
> expect a pause, while it works its way through all those "sleep 1"
> statements even if everything succeeds on the first try. And my
> understanding is that none of my network daemons should try to start
> until the network is up (but they do, and many fail). Here is the
> service file:
> [Unit]
> Description=My utterly non-standard network setup
> Before=network.target
> Wants=network.target
> [Service]
> Type=oneshot
> ExecStart=/etc/rc.local-network
> [Install]
> WantedBy=multi-user.target
> I have tried placing it in both /etc/systemd/system and
> /etc/systemd/multi-user.target.wants (the latter being where a bunch
> of other service files wound up). But every time, when I boot the
> system and log into the console and try "ip link show", it tells me
> that eth0 is down.

The standard thing is to place it in /etc/systemd/system. However,
this will not start it on next boot. For that you should "systemctl
enable nonstandard-network.service" (which will create a symlink in
multi-user.target.wants). To test it, you can do "systemctl start
nonstandard-network.service". To see get some info about what happened
do (as root) "systemctl status nonstandard-network.service". Notice
that anything your service prints to standard out or syslog ends up in
the journal, and the last bits of it is shown by systemctl status (for
more do "journalctl").



More information about the arch-general mailing list