* [gentoo-commits] gentoo-x86 commit in app-emulation/phpvirtualbox/files: vboxinit-initd
@ 2012-06-17 9:17 Markos Chandras (hwoarang)
0 siblings, 0 replies; 2+ messages in thread
From: Markos Chandras (hwoarang) @ 2012-06-17 9:17 UTC (permalink / raw
To: gentoo-commits
hwoarang 12/06/17 09:17:36
Added: vboxinit-initd
Log:
Add init script to automatically start/save virtual machines on boot/shutdown. Thanks to Balint SZENTE <balint@szentedwg.ro>. Bug #420991
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Revision Changes Path
1.1 app-emulation/phpvirtualbox/files/vboxinit-initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/phpvirtualbox/files/vboxinit-initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/phpvirtualbox/files/vboxinit-initd?rev=1.1&content-type=text/plain
Index: vboxinit-initd
===================================================================
#!/sbin/runscript
description="Controls VirtualBox sessions"
. /etc/conf.d/vboxwebsrv
su_command="su - ${VBOXWEBSRV_USER} -c"
depend() {
need localmount
after bootmisc
}
start() {
einfo "Starting VirtualBox machines"
eindent
MACHINES=$($su_command "VBoxManage list vms | awk '{ print \$NF }' | sed -e 's/[{}]//g'")
for UUID in $MACHINES; do
STARTUP=$($su_command "VBoxManage getextradata $UUID 'pvbx/startupMode'" | awk '{ print $NF }')
VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
if [ "${STARTUP}" == "auto" ]; then
ebegin "Starting machine ${VMNAME}"
$su_command "VBoxHeadless -s $UUID --vrde=config" &>> /var/log/vboxinit.log
eend $?
fi
done
}
stop() {
einfo "Saving VirtualBox machines"
eindent
MACHINES=$($su_command "VBoxManage list runningvms | awk '{ print \$NF }' | sed -e 's/[{}]//g'")
for UUID in $MACHINES; do
VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
ebegin "Stopping machine ${VMNAME}"
$su_command "VBoxManage controlvm $UUID savestate" &>> /var/log/vboxinit.log
eend $?
done
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-emulation/phpvirtualbox/files: vboxinit-initd
@ 2012-06-18 17:28 Markos Chandras (hwoarang)
0 siblings, 0 replies; 2+ messages in thread
From: Markos Chandras (hwoarang) @ 2012-06-18 17:28 UTC (permalink / raw
To: gentoo-commits
hwoarang 12/06/18 17:28:40
Modified: vboxinit-initd
Log:
Revbump for improved init script. Bug #420991, comment #17
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Revision Changes Path
1.2 app-emulation/phpvirtualbox/files/vboxinit-initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/phpvirtualbox/files/vboxinit-initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/phpvirtualbox/files/vboxinit-initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/phpvirtualbox/files/vboxinit-initd?r1=1.1&r2=1.2
Index: vboxinit-initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-emulation/phpvirtualbox/files/vboxinit-initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vboxinit-initd 17 Jun 2012 09:17:35 -0000 1.1
+++ vboxinit-initd 18 Jun 2012 17:28:39 -0000 1.2
@@ -20,7 +20,7 @@
VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
if [ "${STARTUP}" == "auto" ]; then
ebegin "Starting machine ${VMNAME}"
- $su_command "VBoxHeadless -s $UUID --vrde=config" &>> /var/log/vboxinit.log
+ $su_command "VBoxManage startvm $UUID --type headless" &>> /var/log/vboxinit.log
eend $?
fi
done
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-18 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-17 9:17 [gentoo-commits] gentoo-x86 commit in app-emulation/phpvirtualbox/files: vboxinit-initd Markos Chandras (hwoarang)
-- strict thread matches above, loose matches on Subject: below --
2012-06-18 17:28 Markos Chandras (hwoarang)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox