diff options
author | randyl <r.levensalor@cablelabs.com> | 2015-06-17 15:23:45 -0600 |
---|---|---|
committer | randyl <r.levensalor@cablelabs.com> | 2015-06-17 15:23:45 -0600 |
commit | be75ed95cc956e1ef634d3878148701c21d15b5a (patch) | |
tree | a3f928194aeede2cdfa43cec77a642552b8d230a /foreman/ci | |
parent | c52a2ce8490535fe839a47b46eb42c458d39106a (diff) |
Fixing verification of vbox drivers JIRA: BGS-74
With the foreman install the vboxdrv module is not loaded
then the deploy.sh script attempts to load the driver by
running ‘/etc/init.d/vboxdrv setup’
and checks the return code for success.
However, /etc/init.d/vboxdrv will return 0 as long a valid parameter was passed on the command line. In the case of a
failure, a failure message will be logged and the return code
will still be 0.
For instance if the kvm module is already loaded, the
VirtualBox driver will never install.
deploy.sh will now check for the VirtualBox kernel module
with lsmod after the setup script is installed.
The deploy.sh will now exit if the vboxdrv is not loaded.
Change-Id: I702819cbf28afb08e0035e08918390af85c07674
Signed-off-by: randyl <r.levensalor@cablelabs.com>
Diffstat (limited to 'foreman/ci')
-rwxr-xr-x | foreman/ci/deploy.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh index 86f03a7..31d41d2 100755 --- a/foreman/ci/deploy.sh +++ b/foreman/ci/deploy.sh @@ -225,7 +225,8 @@ fi ##install kmod-VirtualBox if ! lsmod | grep vboxdrv; then - if ! sudo /etc/init.d/vboxdrv setup; then + sudo /etc/init.d/vboxdrv setup + if ! lsmod | grep vboxdrv; then printf '%s\n' 'deploy.sh: Unable to install kernel module for virtualbox' >&2 exit 1 fi |