> On Jul 21, 2017, at 3:47 AM, Stuart Henderson <s...@spacehopper.org> wrote: > > On 2017-07-20, BARDOU Pierre <bardo...@mipih.fr> wrote: >> Is there a way to make sysctl re-read its conf file, or even another file, >> like sysctl -p does on linux systems ? >> Supporting this option would be nice, as it is used by the sysctl module of >> ansible. > > Sounds risky. It won't reset default values thag are unspecified in > sysctl.conf, so you could be sitting on a configuration that appears ok, > but will fail after a reboot.
Stuart makes a good point. So does Theo, adding -p to the sysctl binary when it doesn't currently do any file handling at all seems extreme. So I wrote a wrapper script that emulates Linux sysctl -p. I put very simple directions at the top of the file. Find it here: https://gist.github.com/PeterFaiman/5b67c530b0ffa009ebef904ed0678e26 Ideally these tools wouldn't use Linux-specific features. But emulating simple features like sysctl -p in a non-invasive way isn't too hard. Peter