Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:ALP:Source:Standard:Core:0.1
procps
procps-v3.3.3-read-sysctls-also-from-boot-sysct...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff of Package procps
--- sysctl.8 | 2 ++ sysctl.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) --- sysctl.8 +++ sysctl.8 2021-02-10 10:05:27.781748090 +0000 @@ -81,6 +81,8 @@ directories in the following list in giv Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. .br +/boot/sysctl.conf-<kernelversion> +.br /etc/sysctl.d/*.conf .br /run/sysctl.d/*.conf --- sysctl.c +++ sysctl.c 2021-02-10 10:04:25.290952318 +0000 @@ -39,6 +39,7 @@ #include <string.h> #include <sys/stat.h> #include <sys/types.h> +#include <sys/utsname.h> #include <unistd.h> #include "c.h" @@ -621,6 +622,7 @@ static int sortpairs(const void *A, cons static int PreloadSystem(void) { unsigned di, i; + struct utsname uts; const char *dirs[] = { "/etc/sysctl.d", "/run/sysctl.d", @@ -685,6 +687,16 @@ static int PreloadSystem(void) } qsort(cfgs, ncfgs, sizeof(struct cfg *), sortpairs); + if (uname(&uts) == 0) { + char buf[PATH_MAX]; + snprintf(buf, sizeof(buf), "/boot/sysctl.conf-%s", uts.release); + if (access(buf, R_OK) == 0) { + if (!Quiet) + printf("* Applying %s ...\n", buf); + Preload(buf); + } + } + for (i = 0; i < ncfgs; ++i) { if (!Quiet) printf(_("* Applying %s ...\n"), cfgs[i]->value);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor