Commit 2617d03a authored by Victor Ananjevsky's avatar Victor Ananjevsky Committed by Craig Small
Browse files

sysctl: Correct stat on /etc/sysctl.conf

sysctl --system fails when the file /etc/sysctl.conf doesn't
exists. This happens due to wrong check of stat(2) return code.


Signed-off-by: Craig Small's avatarCraig Small <>
parent 6a0850be
Pipeline #53201 passed with stage
......@@ -655,7 +655,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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment