xdissent/ievms — pull request #115 by whiteinge (2013-01-30 17:56:24+00:00)
Title: Added check for unloaded kernel module in version output

Fixes #107

When the kernel module is not loaded an error message is output when
running VBoxManage -v (though the exit code is still 0). This prevents
$major_minor_release from being assigned correctly. The script will exit
with the following error message:

bash: line 43: WARNING: unbound variable

The error message contains instructions on how to load/rebuild the
kernel module for the given platform, so we can just exit and output
that message verbatim. The following is an example of the message on
Fedora:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.7.3-101.fc17.x86_64) or it failed to
load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

You will not be able to start VMs until this problem is fixed.
4.1.24r82872