Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2011 14:42:00 -0500
From:      Rusty Nejdl <rnejdl@ringofsaturn.com>
To:        <freebsd-emulation@freebsd.org>
Subject:   Re: AW: rc.d script for running multiple VirtualBox VMs from /etc/rc.conf
Message-ID:  <assp.008319ef8c.0f18d5f68af55df04688012dddb695bf@ringofsaturn.com>
In-Reply-To: <634914A010D0B943A035D226786325D422B76F9205@EXVMBX020-12.exch020.serverdata.net>
References:  <634914A010D0B943A035D226786325D422B76F91CA@EXVMBX020-12.exch020.serverdata.net> <4DA4A6C7.6050803@FreeBSD.org> <634914A010D0B943A035D226786325D422B76F9205@EXVMBX020-12.exch020.serverdata.net>

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

On Tue, 12 Apr 2011 12:35:54 -0700, Tobias Oberstein wrote:=20

>>> I
wanted to configure multiple VirtualBox VMs to startup automatically
at
>> boot time and generally be a nice citizen to the FreeBSD way of
starting up stuff. Thanks for providing this, however there are several
problems, some of which you outlined in your post. The canonical way to
do what you're suggesting is to copy the script so that you have one
script per process you want to start, each with a different
>=20
> I've
tried that first .. but for me it gets unwieldy when you need to manage
i.e. a dozen VMs
>=20
>> $name. That way you avoid a lot of the complexity
that you've created, and everything works.
>=20
> Could you explain how
doing it in separate scripts will solve i.e.
> 2) when the system shuts
down, it doesnt wait for "stop" to finish graceful shutdown of VMs=20
>

>> It does not wait until the VM is actually powered down. Is there
i.e. a rc.d "hook" wh
> to make the shutdown process wait for some
condition (at least up to say a limit of 20s)? What is the canonical way
of doing that kind of stuff? Or is there a way of just making the
shutdown delayed for 30s independent of any of above? Thanks, Tobias
hth, Doug -- Nothin' ever doesn't change, but nothin' changes much. --
OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours
for the right price. :) http://Su
>=20
>>
freebsd-emulation@freebsd.org">freebsd-emulation@freebsd.org mailing
list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation [1] To
unsubscribe, send any ma
>
f=3D"mailto:freebsd-emulation-unsubscribe@freebsd.org">freebsd-emulation-un=
subscribe@freebsd.org"

Tobias,


While I was developing a port for ASSP2, I had to have it do a wait
while it was shutting that down:


stop_cmd=3Dassp2_daemon_stop

command=3D/usr/local/sbin/assp2
command_interpreter=3D/usr/local/bin/perl
pidfile=3D/var/db/assp2/pid

assp2_daemon_stop()
{
 if test -f /var/db/assp2/pid; then
 checkyesno assp_enable && echo
"Stopping assp2." &&=20
 cat /var/db/assp2/pid | xargs kill -3
 while ps
-axoargs | grep "assp2" | grep "perl" | grep -v "stop" | grep -v "grep"
> /dev/null 2>&1; do
 sleep 1;
 done
 else
 echo "assp2 is not
running."
 fi
}
=EF=BB=BF=20

That may solve your problem.=20

Rusty Nejdl=20
=20


Links:
------
[1]
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?assp.008319ef8c.0f18d5f68af55df04688012dddb695bf>