daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From 9944a5e77f0ad03742a1582cd51cc5ebbdd487ed Mon Sep 17 00:00:00 2001
9fc0f6
From: Harald Hoyer <harald@redhat.com>
9fc0f6
Date: Mon, 11 Nov 2013 11:17:57 +0100
9fc0f6
Subject: [PATCH] sysctl: bring back /etc/sysctl.conf
9fc0f6
9fc0f6
Read /etc/sysctl.conf as the last file, overwriting everything.
9fc0f6
---
9fc0f6
 src/sysctl/sysctl.c | 4 ++++
9fc0f6
 1 file changed, 4 insertions(+)
9fc0f6
9fc0f6
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
9fc0f6
index b5670db..878c923 100644
9fc0f6
--- a/src/sysctl/sysctl.c
9fc0f6
+++ b/src/sysctl/sysctl.c
9fc0f6
@@ -311,6 +311,10 @@ int main(int argc, char *argv[]) {
9fc0f6
                         if (k < 0 && r == 0)
9fc0f6
                                 r = k;
9fc0f6
                 }
9fc0f6
+
9fc0f6
+                k = parse_file(sysctl_options, "/etc/sysctl.conf", true);
9fc0f6
+                if (k < 0 && r == 0)
9fc0f6
+                        r = k;
9fc0f6
         }
9fc0f6
 
9fc0f6
         k = apply_all(sysctl_options);