summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm
diff options
context:
space:
mode:
authorVolker Uhrig2009-06-23 16:34:13 +0200
committerVolker Uhrig2009-06-23 16:34:13 +0200
commit83b64a7bc5da94461725965f1ad8edc0ef44364c (patch)
tree3d985dd39859c29540712dfc3847f5d3575ea626 /os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm
parentProper name now ... (there is a list of several hid-* now - to be (diff)
downloadcore-83b64a7bc5da94461725965f1ad8edc0ef44364c.tar.gz
core-83b64a7bc5da94461725965f1ad8edc0ef44364c.tar.xz
core-83b64a7bc5da94461725965f1ad8edc0ef44364c.zip
* Added installation checks
* Basic structur of init.d git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2982 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm')
-rw-r--r--os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm38
1 files changed, 35 insertions, 3 deletions
diff --git a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm
index 5ce615c5..e88cec79 100644
--- a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm
+++ b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm
@@ -113,10 +113,12 @@ sub installationPhase
# Different names of the tool (should be unified somehow!?)
if (!isInPath('VirtualBox')) {
- $engine->installPackages(
- $engine->getInstallablePackagesForSelection('virtualbox-ose')
- );
+ $self->{distro}->installVbox();
}
+ if (!isInPath('VirtualBox')) {
+ print "VirtualBox is not installed. VirtualBox Plugin won't be installed!\n";
+ exit
+ }
# Copy run-virt.include to the appropriate place for inclusion in stage4
copyFile("$self->{openslxBasePath}/lib/plugins/virtualbox/files/run-virt.include",
"$self->{pluginRepositoryPath}/");
@@ -158,6 +160,36 @@ sub _writeRunlevelScript
spitFile($file, $runlevelScript);
+ # function:
+ # running() {
+ # lsmod | grep -q "$1[^_-]"
+ # }
+ # vmstatus() {
+ # if running vboxdrv; then
+ # if running vboxnetflt; then
+ # echo "VirtualBox kernel modules (vboxdrv and vboxnetflt) are loaded."
+ # else
+ # echo "VirtualBox kernel module is loaded."
+ # fi
+ # #TODO: check it: ignore user check. handling our own way:
+ # for i in /tmp/.vbox-*-ipc; do
+ # echo "Running: "
+ # $(VBoxManage --nologo list runningvms | sed -e 's/^".*"//' 2>/dev/null)
+ # done
+ # else
+ # echo "VirtualBox kernel module is not loaded."
+ # fi
+ # }
+ # start() {
+ # modprobe vboxdrv && modprobe vboxnetflt
+ # }
+ # stop() {
+ # rmmod vboxnetflt && rmmod vboxdrv
+ # }
+ # case start: start
+ # case stop: stop
+ # case status: vmstatus
+ # case restart: stop && start
}
# The bridge configuration needs the bridge module to be present in early