sysctl: restore old -p handling
The previous version of sysctl had the form: sysctl -p [file] In other words, it required a space between the -p and the [file]. Omitting the space would lead to an error. The new version though is the opposite: sysctl -p[file] In other words, it requires there to not be a space. Considering the old behavior has been around for a decade, and runtime checking for this mismatch in behavior is silly, and supporting the old syntax is trivial, add support for it. When '-p regexp' is glob is used to make reqular expression to be expanded to argument list, which also means that -p option will allow multiple files being specified as input. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
committed by
Sami Kerola
parent
156dd0b5a3
commit
e2987888e2
6
sysctl.8
6
sysctl.8
@ -12,6 +12,8 @@ sysctl \- configure kernel parameters at runtime
|
||||
.SH SYNOPSIS
|
||||
.B sysctl
|
||||
[\fIoptions\fR] [\fIvariable\fR[\fI=value\fR]] [...]
|
||||
.BR
|
||||
.B sysctl \-p [file or regexp] [...]
|
||||
.SH DESCRIPTION
|
||||
.B sysctl
|
||||
is used to modify kernel parameters at runtime. The parameters available
|
||||
@ -58,6 +60,10 @@ Use this option when you want to change a sysctl setting.
|
||||
\fB\-p\fR[\fIFILE\fR], \fB\-\-load\fR[=\fIFILE\fR]
|
||||
Load in sysctl settings from the file specified or /etc/sysctl.conf if none
|
||||
given. Specifying \- as filename means reading data from standard input.
|
||||
Using this option will mean arguments to
|
||||
.B sysctl
|
||||
are files, which are read in order they are specified. The file argument can
|
||||
may be specified as reqular expression.
|
||||
.TP
|
||||
\fB\-a\fR, \fB\-\-all\fR
|
||||
Display all values currently available.
|
||||
|
Reference in New Issue
Block a user