[CentOS] sysctl -p at startup?
emmett at webengineer.com
Tue Jan 8 19:25:08 UTC 2013
On 01/08/2013 02:58 AM, Michael Simpson wrote:
> On 2 January 2013 17:54, Emmett Culley <emmett at webengineer.com> wrote:
>> I understand that the contents of /etc/sysctl.conf should be read and
>> executed at system startup. However that never happens and I have to run
>> sysctl -p after every reboot to get the settings I want.
>> This is happening on every CentOS machine and VM I have. I can see in
>> the startup scripts that "sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1"
>> is run at start up by the "apply_sysctl" function, yet the settings are
>> never correct unless I run sysctl -p on the command line.
>> Anybody know why that would be?
>> It depends on whether the changes you are making using sysctl are being
> affected by other processes later on in the startup sequence
> I have to run sysctl -p manually in order to stop kernel messages being
> printed to the console as even though i have them configured off in my
> sysctl this is overridden at some other point and i get to find out all
> about SoftMAC and its scanning ways
I ended up putting sysctl -p in to /etc/rc.local, which fixed the problem. I thought I'd read the rc.local is deprecated, so I resisted using it. Oh well...
More information about the CentOS