Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Dec 2009 00:47:30 +0100
From:      Leslie Jensen <leslie@eskk.nu>
To:        Mario Lobo <lobo@bsd.com.br>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: VirtualBox error if kernel module loader in /boot/loader.conf (WAS Re: Loading kernel modules for virtualbox via script)
Message-ID:  <4B315A92.6020207@eskk.nu>
In-Reply-To: <200912222025.19597.lobo@bsd.com.br>
References:  <4B314586.1030301@fletchermoorland.co.uk> <200912222001.08532.lobo@bsd.com.br> <4B315448.909@eskk.nu> <200912222025.19597.lobo@bsd.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help


>
> Sorry for my rush on the previous post. Here is a better script:
> ----------------------------------------------------------
> #!/bin/sh
> #
> # $FreeBSD: src/etc/rc.d/vbox,v 1.0 2009/12/22 20:20:06 mlobo Exp $
> #
>
> # PROVIDE: vbox
> # REQUIRE: LOGIN
> # KEYWORD: nojail
>
> . /etc/rc.subr
>
> name="vbox"
> start_cmd="${name}_start"
> stop_cmd=":"
>
> vboxm_start()
> {
>          /sbin/kldload vboxnetflt
>          /sbin/kldload vboxnetadp
> }
>
> vbox_start()
> {
> 	if checkyesno vbox_enable; then
> 		echo ' VirtualBox modules'
> 		vboxm_start
> 	fi
> }
>
> load_rc_config $name
> run_rc_command "$1"
>
> -------------------------------------------------------
>
> You have to place vbox_enable="YES" on /etc/rc.conf

Thank you Mario.

This works fine, module loaded and VirtualBox VM starts with no error :-)

/Les



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B315A92.6020207>