config root man

Current Path : /etc/rc.d/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //etc/rc.d/sysctl

#!/bin/sh
#
# $FreeBSD: release/9.1.0/etc/rc.d/sysctl 208307 2010-05-19 19:03:19Z dougb $
#

# PROVIDE: sysctl

. /etc/rc.subr

name="sysctl"
stop_cmd=":"
start_cmd="sysctl_start"
reload_cmd="sysctl_start"
lastload_cmd="sysctl_start last"
extra_commands="reload lastload"

#
# Read in a file containing sysctl settings and set things accordingly.
#
parse_file()
{
	if [ -f $1 ]; then
		while read var comments
		do
			case ${var} in
			\#*|'')
				;;
			*)
				mib=${var%=*}
				val=${var#*=}

				if current_value=`${SYSCTL} -n ${mib} 2>/dev/null`; then
					case ${current_value} in
					${val})
						;;
					*)
						if ! sysctl "${var}" >/dev/null 2>&1; then
							warn "unable to set ${var}"
						fi
						;;
					esac
				elif [ "$2" = "last" ]; then
					warn "sysctl ${mib} does not exist."
				fi
				;;
			esac
		done < $1
	fi
}

sysctl_start()
{

	parse_file /etc/sysctl.conf $1
	parse_file /etc/sysctl.conf.local $1
}

load_rc_config $name
run_rc_command "$1"

Man Man