diff options
author | Dirk von Suchodoletz | 2010-02-11 00:45:43 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2010-02-11 00:45:43 +0100 |
commit | 8366523dedf9197d58c2c7030d98f2b7d470d06c (patch) | |
tree | 70639e415c177152a320251bb1b0ede772665028 /os-plugins/plugins/virtualbox/OpenSLX/OSPlugin | |
parent | same improvement as rf00b265a but for pbs (diff) | |
download | core-8366523dedf9197d58c2c7030d98f2b7d470d06c.tar.gz core-8366523dedf9197d58c2c7030d98f2b7d470d06c.tar.xz core-8366523dedf9197d58c2c7030d98f2b7d470d06c.zip |
Cleaning up the runlevel mess of vmware plugin ... Not finished yet.
Diffstat (limited to 'os-plugins/plugins/virtualbox/OpenSLX/OSPlugin')
-rw-r--r-- | os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm index e936590e..fd1424f1 100644 --- a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm +++ b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm @@ -1,4 +1,4 @@ -# Copyright (c) 2009 - OpenSLX GmbH +# Copyright (c) 2009..2010 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -9,7 +9,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # virtualbox.pm -# - Declares necessary information for the virtualbox plugin +# - declares necessary information for the virtualbox plugin # ----------------------------------------------------------------------------- package OpenSLX::OSPlugin::virtualbox; @@ -168,7 +168,7 @@ sub _writeRunlevelScript ); $initfile->addFunction( 'vmstatus', - ' if running vboxdrv; then + 'if running vboxdrv; then if running vboxnetflt; then echo "VirtualBox kernel modules (vboxdrv and vboxnetflt) are loaded." else @@ -188,7 +188,7 @@ sub _writeRunlevelScript ' modprobe vboxdrv && modprobe vboxnetflt', ); $initfile->addFunction( - 'stop', + 'stop', ' rmmod vboxnetflt && rmmod vboxdrv', ); $initfile->addToCase( @@ -208,12 +208,9 @@ sub _writeRunlevelScript 'stop && start' ); - # get distro version (does not work and makes no sense to call an external - # function which is not available in all distros) - # my $workaround_distro = qx(lsb_release -si); - # alternative from bootsplash.pm - my $workaround_distro = (split('-',$self->{'os-plugin-engine'}->distroName()))[0]; - my $runlevelscript = getInitFileForDistro($initfile, $workaround_distro); + # get distro version + my $distro = (split('-',$self->{'os-plugin-engine'}->distroName()))[0]; + my $runlevelscript = getInitFileForDistro($initfile, $distro); # todo: because we dont have distribution or version dependend # init scripts we could put it directly into /etc/init.d... |