mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Wrap rc.subr inside
if [ -z "${_rc_subr_loaded}" ]; then
_rc_subr_loaded="YES"
...
fi
in order to avoid re-interpreting rc.subr every time an rc.d
script is run. In my tests, this speeds up rc time by about
8-10%.
This commit is contained in:
parent
ab0b83b529
commit
f5e16e6131
1 changed files with 6 additions and 0 deletions
|
|
@ -43,6 +43,10 @@
|
|||
# Operating System dependent/independent variables
|
||||
#
|
||||
|
||||
if [ -z "${_rc_subr_loaded}" ]; then
|
||||
|
||||
_rc_subr_loaded="YES"
|
||||
|
||||
SYSCTL="/sbin/sysctl"
|
||||
SYSCTL_N="${SYSCTL} -n"
|
||||
CMD_OSTYPE="${SYSCTL_N} kern.ostype"
|
||||
|
|
@ -1286,3 +1290,5 @@ mount_md() {
|
|||
fi
|
||||
/sbin/mdmfs $bpi -s $1 -M md $2
|
||||
}
|
||||
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue