User Tools

Site Tools


Translations of this page:


This shell script for FreeBSD outputs src.conf(5) man page knobs to a src.conf file as per A Smaller FreeBSD Footprint with /etc/src.conf(5). It should be run on the same system that the src.conf will be used on since it should reflect the available options on that particular system.

NOTE: a reply to this script was posted on freebsd-arm@ providing a simpler, cleaner way to output /etc/src.conf knobs:

   $ make showconfig __MAKE_CONF=/dev/null SRCCONF=/dev/null

This script will remain only for reference purposes.

#!/bin/sh -x
# generate /etc/src.conf file from src.conf(5) man page


# output man page and grep out src.conf knobs
man $page | \

col -b | \

grep WITH | \

grep -v -e '\t' | \

# remove empty space and tabs, then show only unique lines
sed 's/ //g' | \

awk '$1="#"$1' | \

sort -u | \

# append "=yes" to each line and output to src.conf file in $HOME
lam - -s =yes >$HOME/src.conf;
en/a_shell_script_to_convert_src.conf_5_contents_to_an_example_etc_src.conf_file.txt · Last modified: 2018/02/25 16:57 by gman999