sysctl revision 298514
145096Simp#!/bin/sh 245096Simp# 350472Speter# $FreeBSD: head/etc/rc.d/sysctl 298514 2016-04-23 16:10:54Z lme $ 466830Sobrien# 564446Schris 6100280Sgordon# PROVIDE: sysctl 766830Sobrien 8100280Sgordon. /etc/rc.subr 992516Sdougb 10100280Sgordonname="sysctl" 11298514Slmedesc="Set sysctl variables from /etc/sysctl.conf and /etc/sysctl.conf.local" 12244198Sdelphijcommand="/sbin/sysctl" 13100280Sgordonstop_cmd=":" 14124625Smtmstart_cmd="sysctl_start" 15248620Sjillesreload_cmd="sysctl_start last" 16124625Smtmlastload_cmd="sysctl_start last" 17124622Smtmextra_commands="reload lastload" 18100280Sgordon 19181070Sjhbsysctl_start() 20181070Sjhb{ 21244198Sdelphij case $1 in 22244198Sdelphij last) 23248620Sjilles command_args="-f" 24244198Sdelphij ;; 25244198Sdelphij *) 26248620Sjilles command_args="-i -f" 27244198Sdelphij ;; 28244198Sdelphij esac 29181070Sjhb 30244198Sdelphij for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do 31260987Sdemon if [ -r ${_f} ]; then 32260987Sdemon ${command} ${command_args} ${_f} > /dev/null 33260987Sdemon fi 34244198Sdelphij done 35181070Sjhb} 36181070Sjhb 37100280Sgordonload_rc_config $name 38100280Sgordonrun_rc_command "$1" 39