[systemd-devel] [PATCH] install: Do not enable systemd-networkd by default

Jason A. Donenfeld Jason at zx2c4.com
Thu Feb 20 19:38:17 PST 2014


systemd-network.service should not be started unless the administrator
runs "systemctl enable systemd-network.service", as it's entirely
unessential and most distributions use their own network management
daemons instead. If some distributions or users choose to use systemd's
built in networking, then it is simple enough to enable. But by default,
it doesn't make sense to waste resources running this when no networks
are configured with it.
---
 Makefile.am                       | 3 ---
 units/systemd-networkd.service.in | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c71367d..0e4ce72 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3921,9 +3921,6 @@ systemd_networkd_LDADD = \
 nodist_systemunit_DATA += \
 	units/systemd-networkd.service
 
-MULTI_USER_TARGET_WANTS += \
-	systemd-networkd.service
-
 test_network_SOURCES = \
 	src/network/test-network.c \
 	src/network/networkd.h \
diff --git a/units/systemd-networkd.service.in b/units/systemd-networkd.service.in
index 835c07d..ca40691 100644
--- a/units/systemd-networkd.service.in
+++ b/units/systemd-networkd.service.in
@@ -20,3 +20,6 @@ Restart=always
 RestartSec=0
 ExecStart=@rootlibexecdir@/systemd-networkd
 WatchdogSec=1min
+
+[Install]
+WantedBy=multi-user.target
-- 
1.8.5.4



More information about the systemd-devel mailing list