]> granicus.if.org Git - procps-ng/commitdiff
sysctl --system loads default config file
authorCraig Small <csmall@enc.com.au>
Fri, 27 Dec 2013 12:08:14 +0000 (23:08 +1100)
committerCraig Small <csmall@enc.com.au>
Fri, 27 Dec 2013 12:08:14 +0000 (23:08 +1100)
Commit cdca71e94506fbb921ab2c626be3ad05c4287498 fixed
the loading the sysctl.conf file, but had the logic
for checking the file exists reversed incorrectly.

NEWS
sysctl.c

diff --git a/NEWS b/NEWS
index 287f86716d28d8e56cb9a9525b876a5064b84187..1c710a3b5802cc8769e0b97772c2b1efdf47da55 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+procps-ng-3.3.10
+----------------
+  * sysctl --system loads default config file - Debian #732920
+
 procps-ng-3.3.9
 ---------------
   * kernel namespaces support added to skill, pgrep, ps and top
index bb3e6b736853abda637967504560a05a52431862..33c9403582b0d8a0f8151142b123aaddb0687341 100644 (file)
--- a/sysctl.c
+++ b/sysctl.c
@@ -640,7 +640,7 @@ static int PreloadSystem(void)
        }
 
 
-       if (stat(DEFAULT_PRELOAD, &ts) < 0 && S_ISREG(ts.st_mode)) {
+       if (stat(DEFAULT_PRELOAD, &ts) < 0 || S_ISREG(ts.st_mode)) {
                if (!Quiet)
                        printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD);
                rc |= Preload(DEFAULT_PRELOAD);