Bug 217595 - sysctl usage
Summary: sysctl usage
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-28 21:59 UTC by Karel Zak
Modified: 2014-03-17 03:04 UTC (History)
1 user (show)

Fixed In Version: 8.52-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-16 23:38:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
diff (1.61 KB, patch)
2007-04-16 23:37 UTC, Bill Nottingham
no flags Details | Diff

Description Karel Zak 2006-11-28 21:59:29 UTC
Please, see /etc/sysconfig/network-scripts/init.ipv6-global.

There is used "sysctl -a | grep", although the sysctl command supports
selection. It means

  sysctl -a | grep "^net\.ipv6\.conf\."

could be replaced with:

  sysctl net.ipv6.conf

Why? See:

  # sysctl net.ipv6.conf | wc -l
  84
  # sysctl -a | wc -l
  608


To be honest, the way how this init script reads list of interfaces is *ugly*. 

  sysctl -a | grep "^net\.ipv6\.conf\." | awk -F. '{ print $4 }' | sort -u

should be replaced with:
 
  ls /proc/sys/net/ipv6/conf/

Comment 1 Bill Nottingham 2007-04-16 23:37:54 UTC
Created attachment 152727 [details]
diff 

Here's what's going in 8.52-1. Cuts the time for showsysctl from 16 seconds to
a little over 1.


Note You need to log in before you can comment on or make changes to this bug.