4 # For each sysctl, repeat:
5 # if it has a short description
6 # sysctl.sh name "descr"
8 # write its name to tunables.TODO with 'name missing description'
9 # Note: This functionality is to point out which sysctls/tunables
10 # have no description in the source. This may be helpful for those
11 # wishing to document the sysctls.
15 if [ X"${name}" = X"" ]; then
16 echo "usage: $(basename $0) sysctl-name" >&2
21 # Look up $name in tunables.mdoc
24 sed -ne "/^${name}[[:space:]]*$/,/^---[[:space:]]*$/p" | \
25 sed -e '/^---[[:space:]]*$/d' | \
29 if [ X"${tmpname}" = X"" ]; then \
32 read type value _junk; \
34 if [ X"${type}" = X"" ]; then \
36 echo "ERROR: Missing type for ${name}" >&2 ; \
38 if [ X"${value}" = X"" ]; then \
40 echo "ERROR: Missing default for ${name}" >&2 ; \
43 echo ".It Va ${tmpname}" ; \
44 if [ X"${type}" != X"" ]; then \
45 echo ".Pq Vt ${type}" ; \
47 grep -v '^[[:space:]]*$' | \
48 sed -e "s/@default@/${value}/g" | \
49 sed -e "s/@type@/${type}/g" ; \