mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 05:55:27 +01:00
eea6404df7
are absent. Approved by: delphij
38 lines
515 B
Bash
Executable File
38 lines
515 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: sysctl
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="sysctl"
|
|
command="/sbin/sysctl"
|
|
stop_cmd=":"
|
|
start_cmd="sysctl_start"
|
|
reload_cmd="sysctl_start last"
|
|
lastload_cmd="sysctl_start last"
|
|
extra_commands="reload lastload"
|
|
|
|
sysctl_start()
|
|
{
|
|
case $1 in
|
|
last)
|
|
command_args="-f"
|
|
;;
|
|
*)
|
|
command_args="-i -f"
|
|
;;
|
|
esac
|
|
|
|
for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do
|
|
if [ -r ${_f} ]; then
|
|
${command} ${command_args} ${_f} > /dev/null
|
|
fi
|
|
done
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|