mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Fix #403 add config option to allow passing bhyveload arguments (bhyveload_args)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user