diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch b/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch new file mode 100644 index 0000000000..f2c8e0290f --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | -Khem 2013/03/28 | ||
4 | |||
5 | From 6f6fad96addf6b00b55c98cc0d0d8026b0c1e7ca Mon Sep 17 00:00:00 2001 | ||
6 | From: Eelco Dolstra <eelco.dolstra@logicblox.com> | ||
7 | Date: Wed, 27 Mar 2013 13:41:59 +0100 | ||
8 | Subject: [PATCH 13/17] systemd-sysctl: Handle missing /etc/sysctl.conf | ||
9 | properly | ||
10 | |||
11 | Since fabe5c0e5fce730aa66e10a9c4f9fdd443d7aeda, systemd-sysctl returns | ||
12 | a non-zero exit code if /etc/sysctl.conf does not exist, due to a | ||
13 | broken ENOENT check. | ||
14 | --- | ||
15 | src/sysctl/sysctl.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c | ||
19 | index 2d43660..79f3f77 100644 | ||
20 | --- a/src/sysctl/sysctl.c | ||
21 | +++ b/src/sysctl/sysctl.c | ||
22 | @@ -125,7 +125,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno | ||
23 | |||
24 | r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f); | ||
25 | if (r < 0) { | ||
26 | - if (ignore_enoent && errno == -ENOENT) | ||
27 | + if (ignore_enoent && r == -ENOENT) | ||
28 | return 0; | ||
29 | |||
30 | log_error("Failed to open file '%s', ignoring: %s", path, strerror(-r)); | ||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||