valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0003-sysctl-bring-back-etc-sysctl.conf.patch

803fb7
From d2deeea1d5aa1d13139b9e9f70c6655abb589530 Mon Sep 17 00:00:00 2001
803fb7
From: Harald Hoyer <harald@redhat.com>
803fb7
Date: Mon, 11 Nov 2013 11:17:57 +0100
803fb7
Subject: [PATCH] sysctl: bring back /etc/sysctl.conf
803fb7
803fb7
Read /etc/sysctl.conf as the last file, overwriting everything.
803fb7
---
803fb7
 src/sysctl/sysctl.c | 4 ++++
803fb7
 1 file changed, 4 insertions(+)
803fb7
803fb7
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
803fb7
index 275a5b74a..d007c932c 100644
803fb7
--- a/src/sysctl/sysctl.c
803fb7
+++ b/src/sysctl/sysctl.c
803fb7
@@ -320,6 +320,10 @@ int main(int argc, char *argv[]) {
803fb7
                         if (k < 0 && r == 0)
803fb7
                                 r = k;
803fb7
                 }
803fb7
+
803fb7
+                k = parse_file(sysctl_options, "/etc/sysctl.conf", true);
803fb7
+                if (k < 0 && r == 0)
803fb7
+                        r = k;
803fb7
         }
803fb7
 
803fb7
         k = apply_all(sysctl_options);