sysctl revision 260987
145096Simp#!/bin/sh 245096Simp# 350472Speter# $FreeBSD: head/etc/rc.d/sysctl 260987 2014-01-21 18:57:49Z demon $ 466830Sobrien# 564446Schris 6100280Sgordon# PROVIDE: sysctl 766830Sobrien 8100280Sgordon. /etc/rc.subr 992516Sdougb 10100280Sgordonname="sysctl" 11244198Sdelphijcommand="/sbin/sysctl" 12100280Sgordonstop_cmd=":" 13124625Smtmstart_cmd="sysctl_start" 14248620Sjillesreload_cmd="sysctl_start last" 15124625Smtmlastload_cmd="sysctl_start last" 16124622Smtmextra_commands="reload lastload" 17100280Sgordon 18181070Sjhbsysctl_start() 19181070Sjhb{ 20244198Sdelphij case $1 in 21244198Sdelphij last) 22248620Sjilles command_args="-f" 23244198Sdelphij ;; 24244198Sdelphij *) 25248620Sjilles command_args="-i -f" 26244198Sdelphij ;; 27244198Sdelphij esac 28181070Sjhb 29244198Sdelphij for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do 30260987Sdemon if [ -r ${_f} ]; then 31260987Sdemon ${command} ${command_args} ${_f} > /dev/null 32260987Sdemon fi 33244198Sdelphij done 34181070Sjhb} 35181070Sjhb 36100280Sgordonload_rc_config $name 37100280Sgordonrun_rc_command "$1" 38