fix
OBS-URL: https://build.opensuse.org/package/show/Base:System/procps?expand=0&rev=53
This commit is contained in:
parent
96ecb2706c
commit
fd9cf627ce
@ -1,14 +1,14 @@
|
|||||||
From 0925e01c49599c541ea3d40a7e30a313bb77efce Mon Sep 17 00:00:00 2001
|
From 16c356dc827152883b1e0d5c5f195eeff6f85daf Mon Sep 17 00:00:00 2001
|
||||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||||
Date: Tue, 17 May 2011 16:35:18 +0200
|
Date: Tue, 17 May 2011 16:35:18 +0200
|
||||||
Subject: [PATCH 3/3] read sysctls also from /boot/sysctl.conf-$kernelversion
|
Subject: [PATCH 3/3] read sysctls also from /boot/sysctl.conf-$kernelversion
|
||||||
|
|
||||||
---
|
---
|
||||||
sysctl.c | 11 +++++++++++
|
sysctl.c | 12 ++++++++++++
|
||||||
1 files changed, 11 insertions(+), 0 deletions(-)
|
1 files changed, 12 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
diff --git a/sysctl.c b/sysctl.c
|
diff --git a/sysctl.c b/sysctl.c
|
||||||
index 1867777..a41539b 100644
|
index 1867777..a38a81c 100644
|
||||||
--- a/sysctl.c
|
--- a/sysctl.c
|
||||||
+++ b/sysctl.c
|
+++ b/sysctl.c
|
||||||
@@ -27,6 +27,7 @@
|
@@ -27,6 +27,7 @@
|
||||||
@ -27,17 +27,18 @@ index 1867777..a41539b 100644
|
|||||||
const char* dirs[] = {
|
const char* dirs[] = {
|
||||||
"/run/sysctl.d",
|
"/run/sysctl.d",
|
||||||
"/etc/sysctl.d",
|
"/etc/sysctl.d",
|
||||||
@@ -556,6 +558,15 @@ static int PreloadSystem(void) {
|
@@ -556,6 +558,16 @@ static int PreloadSystem(void) {
|
||||||
|
|
||||||
qsort(cfgs, ncfgs, sizeof(struct cfg*), sortpairs);
|
qsort(cfgs, ncfgs, sizeof(struct cfg*), sortpairs);
|
||||||
|
|
||||||
+ if (uname(&uts) == 0) {
|
+ if (uname(&uts) == 0) {
|
||||||
+ char buf[PATH_MAX];
|
+ char buf[PATH_MAX];
|
||||||
+ snprintf(buf, sizeof(buf), "/boot/sysctl.conf-%s", uts.release);
|
+ snprintf(buf, sizeof(buf), "/boot/sysctl.conf-%s", uts.release);
|
||||||
+ if (access(buf, R_OK) == 0) {
|
+ if (access(buf, R_OK) == 0) {
|
||||||
+ printf("* Applying %s ...\n", buf);
|
+ if (!Quiet)
|
||||||
+ Preload(buf);
|
+ printf("* Applying %s ...\n", buf);
|
||||||
+ }
|
+ Preload(buf);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
for (i = 0; i < ncfgs; ++i) {
|
for (i = 0; i < ncfgs; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user