sysctl is using deprecated syscall

Pekka Savola pekkas at netcore.fi
Wed Apr 11 06:20:40 UTC 2007


Hi,

(I added Peter in Cc: as he's probably not following this.)

On Tue, 10 Apr 2007, Miloslav Trmac wrote:
> Hello,
> Tomas Smetana napsal(a):
>> The problem is that any attempt to read a deprecated sysctl ends up
>> with kernel warning in the log. Thus "sysctl -a" produces warnings and
>> since "sysctl -a" is used in init scripts
>> (/etc/sysconfig/network-scripts/init.ipv6-global),
>
> While I have no opinion about the general case, can't the (sysctl -a
> |grep "^net\.ipv6.conf\.") be replaced by (sysctl net.ipv6.conf) ?

The reason is probably that when the initscripts were created 'sysctl 
net.ipv6.conf' wasn't supported.  For example, it doesn't work 
(returns nothing) on RHL73 and RHL9 (and I suspect RHEL21 and RHEL3).
It works on RHEL4 though.

I'm also not sure (didn't check) if the failure mode is different when 
IPv6 hasn't been loaded.  The grep returns an empty set, sysctl 
returns an error and a return code.  Either could be made to work.

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings




More information about the fedora-devel-list mailing list