summaryrefslogtreecommitdiff
path: root/src/grp-network
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-network')
-rw-r--r--src/grp-network/Makefile30
-rw-r--r--src/grp-network/libnetworkd-core/.gitignore (renamed from src/grp-network/.gitignore)0
-rw-r--r--src/grp-network/network/network.target13
-rw-r--r--src/grp-network/systemd-networkd-wait-online/Makefile9
-rw-r--r--src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in23
-rw-r--r--src/grp-network/systemd-networkd/Makefile31
-rw-r--r--src/grp-network/systemd-networkd/org.freedesktop.network1.conf (renamed from src/grp-network/org.freedesktop.network1.conf)0
-rw-r--r--src/grp-network/systemd-networkd/org.freedesktop.network1.service (renamed from src/grp-network/org.freedesktop.network1.service)0
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.service.m4.in37
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.socket21
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.tmpfiles12
11 files changed, 148 insertions, 28 deletions
diff --git a/src/grp-network/Makefile b/src/grp-network/Makefile
index 7cbd9142d0..54f06b1822 100644
--- a/src/grp-network/Makefile
+++ b/src/grp-network/Makefile
@@ -23,7 +23,8 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-dist_network_DATA = \
+# TODO
+_dist_network_DATA = \
network/99-default.link \
network/80-container-host0.network \
network/80-container-ve.network \
@@ -65,33 +66,6 @@ tests += \
test-network \
test-network-tables
-dist_systemunit_DATA += \
- units/systemd-networkd.socket
-
-nodist_systemunit_DATA += \
- units/systemd-networkd.service \
- units/systemd-networkd-wait-online.service
-
-dist_systemunit_DATA_busnames += \
- units/org.freedesktop.network1.busname
-
-dist_dbussystemservice_DATA += \
- src/network/org.freedesktop.network1.service
-
-dist_dbuspolicy_DATA += \
- src/network/org.freedesktop.network1.conf
-
-GENERAL_ALIASES += \
- $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
- $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
- $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
-
-SYSTEM_UNIT_ALIASES += \
- systemd-networkd.service dbus-org.freedesktop.network1.service
-
-BUSNAMES_TARGET_WANTS += \
- org.freedesktop.network1.busname
-
endif # ENABLE_NETWORKD
gperf_gperf_sources += \
diff --git a/src/grp-network/.gitignore b/src/grp-network/libnetworkd-core/.gitignore
index aca55206b7..aca55206b7 100644
--- a/src/grp-network/.gitignore
+++ b/src/grp-network/libnetworkd-core/.gitignore
diff --git a/src/grp-network/network/network.target b/src/grp-network/network/network.target
new file mode 100644
index 0000000000..61ebdcadd0
--- /dev/null
+++ b/src/grp-network/network/network.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Network
+Documentation=man:systemd.special(7)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
+After=network-pre.target
+RefuseManualStart=yes
diff --git a/src/grp-network/systemd-networkd-wait-online/Makefile b/src/grp-network/systemd-networkd-wait-online/Makefile
index 12aa13c48f..8d1870c862 100644
--- a/src/grp-network/systemd-networkd-wait-online/Makefile
+++ b/src/grp-network/systemd-networkd-wait-online/Makefile
@@ -41,4 +41,13 @@ systemd_networkd_wait_online_LDADD = \
libsystemd-network.la \
libshared.la
+nodist_systemunit_DATA += \
+ units/systemd-networkd-wait-online.service
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
+
+EXTRA_DIST += \
+ units/systemd-networkd-wait-online.service.in
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in
new file mode 100644
index 0000000000..a9bad7aa8f
--- /dev/null
+++ b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Wait for Network to be Configured
+Documentation=man:systemd-networkd-wait-online.service(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+Requisite=systemd-networkd.service
+After=systemd-networkd.service
+Before=network-online.target
+
+[Service]
+Type=oneshot
+ExecStart=@rootlibexecdir@/systemd-networkd-wait-online
+RemainAfterExit=yes
+
+[Install]
+WantedBy=network-online.target
diff --git a/src/grp-network/systemd-networkd/Makefile b/src/grp-network/systemd-networkd/Makefile
index 8b7e44062b..764b51a2ba 100644
--- a/src/grp-network/systemd-networkd/Makefile
+++ b/src/grp-network/systemd-networkd/Makefile
@@ -37,4 +37,35 @@ systemd_networkd_LDADD += \
libfirewall.la
endif # HAVE_LIBIPTC
+dist_systemunit_DATA += \
+ units/systemd-networkd.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-networkd.service \
+ units/systemd-networkd-wait-online.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.network1.busname
+
+dist_dbussystemservice_DATA += \
+ src/network/org.freedesktop.network1.service
+
+dist_dbuspolicy_DATA += \
+ src/network/org.freedesktop.network1.conf
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
+ $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
+ $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-networkd.service dbus-org.freedesktop.network1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.network1.busname
+
+EXTRA_DIST += \
+ units/systemd-networkd.service.m4.in \
+ test/networkd-test.py
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-network/org.freedesktop.network1.conf b/src/grp-network/systemd-networkd/org.freedesktop.network1.conf
index 52dad33668..52dad33668 100644
--- a/src/grp-network/org.freedesktop.network1.conf
+++ b/src/grp-network/systemd-networkd/org.freedesktop.network1.conf
diff --git a/src/grp-network/org.freedesktop.network1.service b/src/grp-network/systemd-networkd/org.freedesktop.network1.service
index bea885fe53..bea885fe53 100644
--- a/src/grp-network/org.freedesktop.network1.service
+++ b/src/grp-network/systemd-networkd/org.freedesktop.network1.service
diff --git a/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in b/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in
new file mode 100644
index 0000000000..27d4d58962
--- /dev/null
+++ b/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in
@@ -0,0 +1,37 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Network Service
+Documentation=man:systemd-networkd.service(8)
+ConditionCapability=CAP_NET_ADMIN
+DefaultDependencies=no
+# dbus.service can be dropped once on kdbus, and systemd-udevd.service can be
+# dropped once tuntap is moved to netlink
+After=systemd-udevd.service dbus.service network-pre.target systemd-sysusers.service systemd-sysctl.service
+Before=network.target multi-user.target shutdown.target
+Conflicts=shutdown.target
+Wants=network.target
+
+# On kdbus systems we pull in the busname explicitly, because it
+# carries policy that allows the daemon to acquire its name.
+Wants=org.freedesktop.network1.busname
+After=org.freedesktop.network1.busname
+
+[Service]
+Type=notify
+Restart=on-failure
+RestartSec=0
+ExecStart=@rootlibexecdir@/systemd-networkd
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER
+ProtectSystem=full
+ProtectHome=yes
+WatchdogSec=3min
+
+[Install]
+WantedBy=multi-user.target
+Also=systemd-networkd.socket
diff --git a/src/grp-network/systemd-networkd/systemd-networkd.socket b/src/grp-network/systemd-networkd/systemd-networkd.socket
new file mode 100644
index 0000000000..9e4e9dd338
--- /dev/null
+++ b/src/grp-network/systemd-networkd/systemd-networkd.socket
@@ -0,0 +1,21 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Network Service Netlink Socket
+Documentation=man:systemd-networkd.service(8) man:rtnetlink(7)
+ConditionCapability=CAP_NET_ADMIN
+DefaultDependencies=no
+Before=sockets.target
+
+[Socket]
+ReceiveBuffer=8M
+ListenNetlink=route 1361
+PassCredentials=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles b/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles
new file mode 100644
index 0000000000..24197555ee
--- /dev/null
+++ b/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles
@@ -0,0 +1,12 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+d /run/systemd/netif 0755 systemd-network systemd-network -
+d /run/systemd/netif/links 0755 systemd-network systemd-network -
+d /run/systemd/netif/leases 0755 systemd-network systemd-network -