Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 3dd8bca5a331f46a5ba1cbec6d91c01d > files > 33

systemd-217-11.2.mga5.src.rpm

From e49d8a3dca1a972a2c609d5a71ff99f891a23c17 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Mon, 13 Jan 2014 19:14:40 +0000
Subject: [PATCH 513/513] systemctl: Ensure the --no-reload and --no-redirect
 options are passed to chkconfig

We want to ensure that chkconfig won't create any circular loops incase
it mistakenly things we're in control. Thus the --no-redirect argument
is a good safety net.

The --no-reload prevents a very strange case where the the shelled
out chkconfig will trigger a systemd daemon-reload (by itself shelling
out to systemctl) and then we also reload ourselves very shortly after
and this causes systemd to get into a very strange state whereby it
basically crashes (I suspect a serialisation race of some kind) and
as one of the symptoms it writes out a /run/nologin file which is
what most people notice.

A patch has been added to chkconfig to add the --no-reload behaviour.
---
 src/systemctl/systemctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 459a211..55f3a83 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5014,8 +5014,8 @@ static int enable_sysv_units(const char *verb, char **args) {
                 const char *name;
                 _cleanup_free_ char *p = NULL, *q = NULL, *l = NULL;
                 bool found_native = false, found_sysv;
-                unsigned c = 1;
-                const char *argv[6] = { "/sbin/chkconfig", NULL, NULL, NULL, NULL };
+                unsigned c = 3;
+                const char *argv[6] = { "/sbin/chkconfig", "--no-reload", "--no-redirect", NULL, NULL, NULL, NULL };
                 char **k;
                 int j;
                 pid_t pid;
-- 
1.9.2