opnsense-src/libexec/rc/rc.d/sysctl_lastload
Eugene Grosbein 4ee2bcb486 rc.d: unbreak sysctl lastload
/etc/rc.d/securelevel is supposed to run /etc/rc.d/sysctl lastload
late at boot time to apply /etc/sysctl.conf settings that fail
to apply early. However, this does not work in default configuration
because of kern_securelevel_enable="NO" by default.

Add new script /etc/rc.d/sysctl_lastload that starts unconditionally.

Reported by:	Marek Zarychta

(cherry picked from commit f4b38c360e)
2021-07-16 13:35:11 +07:00

18 lines
291 B
Bash
Executable file

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: sysctl_lastload
# REQUIRE: LOGIN
# BEFORE: jail
. /etc/rc.subr
name="sysctl_lastload"
desc="Last chance to set sysctl variables that failed the first time."
start_cmd="/etc/rc.d/sysctl lastload"
stop_cmd=":"
load_rc_config $name
run_rc_command "$1"