> Am 21.02.2023 um 12:00 schrieb Crystal Kolipe <kolip...@exoticsilicon.com>: > > On Tue, Feb 21, 2023 at 11:29:17AM +0100, jhx wrote: >> this patch adds the "-p" option to sysctl which makes it possible to >> read/parse/apply settings from /etc/sysctl.conf at any time the user wishes. > > This is an interesting idea, but you can effectively do the same thing > from the shell with: > > # sysctl `cat /etc/sysctl.conf` > > Also, note that both your patch and the above shell command do not > gracefully handle comment lines in /etc/sysctl.conf, (although that > shouldn't cause any problem in practice).
Also there is a difference between the use of /etc/sysctl.conf at boot and when using either the proposed -p option or the shell command: At boot we start out with the default values. When re-reading /etc/sysctl.conf the current state is the base. That is very relevant if you e.g. remove a line from /etc/sysctl.conf (to go back to the default). Mike