diff options
Diffstat (limited to 'os-plugins/plugins/virtualbox')
-rw-r--r-- | os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm | 24 | ||||
-rw-r--r-- | os-plugins/plugins/virtualbox/init-hooks/20-nw-bridge-config/bridge.sh | 8 |
2 files changed, 23 insertions, 9 deletions
diff --git a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm index dee9ade8..0ce63150 100644 --- a/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm +++ b/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm @@ -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; @@ -50,7 +50,7 @@ sub getInfo sub getAttrInfo { - # returns a hash-ref with information about all attributes supported + # Returns a hash-ref with information about all attributes supported # by this specific plugin my $self = shift; @@ -111,13 +111,13 @@ sub installationPhase my $engine = $self->{'os-plugin-engine'}; - # different names of the tool (should be unified somehow!?) + # Different names of the tool (should be unified somehow!?) if (!isInPath('VirtualBox')) { $engine->installPackages( $engine->getInstallablePackagesForSelection('virtualbox-ose') ); } - # copy run-virt.include to the appropriate place for inclusion in stage4 + # Copy run-virt.include to the appropriate place for inclusion in stage4 copyFile("$self->{openslxBasePath}/lib/plugins/virtualbox/files/run-virt.include", "$self->{pluginRepositoryPath}/"); @@ -144,7 +144,7 @@ sub checkStage3AttrValues return; } -# write the runlevelscript +# Write the runlevelscript sub _writeRunlevelScript { my $self = shift; @@ -157,4 +157,18 @@ sub _writeRunlevelScript spitFile($file, $runlevelScript); } +# The bridge configuration needs the bridge module to be present in early +# stage3 +sub suggestAdditionalKernelModules +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + + my @suggestedModules; + + push @suggestedModules, qw( bridge ); + + return @suggestedModules; +} + 1; diff --git a/os-plugins/plugins/virtualbox/init-hooks/20-nw-bridge-config/bridge.sh b/os-plugins/plugins/virtualbox/init-hooks/20-nw-bridge-config/bridge.sh index 7503e3ab..f570147b 100644 --- a/os-plugins/plugins/virtualbox/init-hooks/20-nw-bridge-config/bridge.sh +++ b/os-plugins/plugins/virtualbox/init-hooks/20-nw-bridge-config/bridge.sh @@ -10,10 +10,9 @@ # General information about OpenSLX can be found at http://openslx.org # # Init hook to create a bridge on the active network interface +# (should be kept identical to the files of vmware and qemukvm plugins) ############################################################################# -set -x - local bridge=br0 local brnwif=${nwif} local nwifmac=${macaddr} @@ -22,9 +21,10 @@ local nwifmac=${macaddr} brctl addbr ${bridge} || exit 0 brctl stp ${bridge} off brctl setfd ${bridge} 0.000000000001 -ip link set addr ${nwifmac} br0 +ip link set addr ${nwifmac} ${bridge} ip link set dev ${nwif} up brctl addif ${bridge} ${nwif} -# fixme: sending back the variable to init does not work properly at the moment +# fixme: sending back the variable to init does not work properly at the +# moment nwif=${bridge} |