Fix #403 add config option to allow passing bhyveload arguments (bhyveload_args)

This commit is contained in:
Matt Churchyard
2021-03-18 13:17:57 +00:00
parent 55dd860070
commit 678832df94
2 changed files with 6 additions and 2 deletions

View File

@@ -25,7 +25,7 @@
# POSSIBILITY OF SUCH DAMAGE.
VERSION=1.5-devel
VERSION_INT=105015
VERSION_INT=105016
VERSION_BSD=$(uname -K)
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

View File

@@ -49,7 +49,7 @@
#
guest::load(){
local _iso="$1"
local _args _command _timeout _grub_opt _bsd_loader
local _args _command _timeout _grub_opt _bsd_loader _custom_args
# require a boot disk
if [ -z "${_bootdisk}" ]; then
@@ -69,6 +69,10 @@ guest::load(){
_command="bhyveload"
_args="${_args}${_args:+ }-m ${_memory} -e autoboot_delay=${_timeout}"
# look for custom bhyveload arguments
config::get "_custom_args" "bhyveload_args"
[ -n "${_custom_args}" ] && _args="${_args} ${_custom_args}"
# have a custom guest loader specified?
config::get "_bsd_loader" "bhyveload_loader"
[ -n "${_bsd_loader}" ] && _args="${_args} -l ${_bsd_loader}"