systemd/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch

52 lines
2.4 KiB
Diff
Raw Normal View History

From 0404c609f399b2092a3de52eef9d75b0dc12e94c Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 12 May 2014 21:26:54 +0200
Subject: [PATCH] core: sysvcompat - $network should be equivalent to
network-online, rather than network target
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Most likely the facility needed is actual connectivity, rather than whether or not the
network managment daemon is running.
We also need to explicitly pull in the network-online.target, as it is not active by
default.
This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default
as part of network-online.target, and only delay boot when some service actively pulls it in.
See: <https://bugzilla.gnome.org/show_bug.cgi?id=728965>
Cc: Pavel Šimerda <psimerda@redhat.com>
Cc: Michal Sekletar <msekleta@redhat.com>
---
TODO | 4 ----
src/core/service.c | 8 ++++++--
2 files changed, 6 insertions(+), 6 deletions(-)
Modified by Andrey Borzenkov <arvidjaar@gmail.com> for openSUSE.
Index: systemd-210/src/core/service.c
===================================================================
--- systemd-210.orig/src/core/service.c
+++ systemd-210/src/core/service.c
@@ -404,7 +404,7 @@ static int sysv_translate_facility(const
static const char * const table[] = {
/* LSB defined facilities */
"local_fs", NULL,
- "network", SPECIAL_NETWORK_TARGET,
+ "network", SPECIAL_NETWORK_ONLINE_TARGET,
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
@@ -881,6 +881,9 @@ static int service_load_sysv_path(Servic
if (r == 0)
continue;
+ if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET) && d == UNIT_AFTER && e == _UNIT_DEPENDENCY_INVALID)
+ e = UNIT_WANTS;
+
if (e != _UNIT_DEPENDENCY_INVALID)
r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true);
else