From owner-freebsd-emulation@FreeBSD.ORG Mon May 26 07:53:18 2014 Return-Path: Delivered-To: vbox@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A10318B1 for ; Mon, 26 May 2014 07:53:18 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 63856233D for ; Mon, 26 May 2014 07:53:18 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 25BD7AFCF; Mon, 26 May 2014 07:53:17 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id D787D310CF; Mon, 26 May 2014 09:52:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bernhard =?utf-8?Q?Fr=C3=B6hlich?= Subject: Re: virtualbox-ose-kmod rc scripts References: <861tvh62ni.fsf@nine.des.no> Date: Mon, 26 May 2014 09:52:57 +0200 In-Reply-To: ("Bernhard =?utf-8?Q?Fr=C3=B6hlich=22's?= message of "Mon, 26 May 2014 06:02:02 +0200") Message-ID: <86ha4drn6u.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Mon, 26 May 2014 11:10:40 +0000 Cc: vbox@freebsd.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 07:53:18 -0000 Bernhard Fr=C3=B6hlich writes: > The vboxdrv module needs to be loaded via loader.conf or it can cause > kernel panics. Hmm, details? I might look into it (although I won't really have time until late June). I loaded it manually after installation and have three VMs running now, one of which completed a buildworld buildkernel -j3 last night. But loading it in the rc script doesn't really hurt if it's already in loader.conf. As for the issue of redundant code in the vboxnet rc script: --- a/usr/local/etc/rc.d/vboxnet 2014-05-25 05:26:59.000000000 +0200 +++ b/usr/local/etc/rc.d/vboxnet 2014-05-26 09:45:16.002955115 +0200 @@ -24,47 +24,18 @@ =20 vboxnet_start() { - if ! kldstat -q -m ng_vboxnetflt; - then - if ! kldload vboxnetflt > /dev/null 2>&1; - then - warn "Can't load vboxnetflt module." - return 1 - fi - fi - - if ! kldstat -q -m vboxnetadp; - then - if ! kldload vboxnetadp > /dev/null 2>&1; - then - warn "Can't load vboxnetadp module." - return 1 - fi - fi - + load_kld -m ng_vboxnetflt vboxnetflt + load_kld vboxnetadp # initialize configured host-only interfaces /usr/local/bin/VBoxManage list hostonlyifs >/dev/null } =20 vboxnet_stop() { - if kldstat -q -m vboxnetadp; - then - if ! kldunload vboxnetadp > /dev/null 2>&1; - then - warn "Can't unload vboxnetadp module." - return 1 - fi - fi - - if kldstat -q -m ng_vboxnetflt; - then - if ! kldunload vboxnetflt > /dev/null 2>&1; - then - warn "Can't unload vboxnetflt module." - return 1 - fi - fi + kldunload vboxnetadp >/dev/null 2>&1 || + warn "Can't unload vboxnetadp module." + kldunload vboxnetflt >/dev/null 2>&1 || + warn "Can't unload vboxnetflt module." } =20 load_rc_config $name DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no