Re: sysctl -p at startup?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 09.01.2013 um 17:13 schrieb Emmett Culley:
> On 01/08/2013 12:39 PM, Leon Fauster wrote:
>> 
>> for sysctl configs i suggest the /etc/sysctl.d directory (create it if ...)
>> 
>> for example:
>> 
>> $ cat /etc/sysctl.d/vpn.conf
>> net.ipv4.ip_forward = 1
>> 
> 
> There was no /etc/sysctl.d directory, so I created one and added a file with
> sysctl -p on the first line, still no change to my requested settings after
> a reboot.  So I changed the file to look like:
> 
> #!/bin/bash
> sysctl -p
> 
> and made it executable (just in case :-) and of course that didn't work either.
> 
> I've noted that there was a bug reported for RHEL5 that stated this would be fixed in 6.  
> I guess that didn't happen.  And I am not even certain that it isn't working as expected.
> 
> In the mean time I will stick to using /etc/rc.local.




The files (/etc/sysctl.d/*.conf) must have the format of 
e.g.

net.ipv4.ip_forward = 1

like /etc/sysctl.conf

That files (/etc/sysctl.d/*.conf) are read by the start 
script rc.sysinit (function apply_sysctl) after /etc/sysctl.conf
was read. 


--
LF








_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux