From a2f7912a1615a683a1d6ebd0ee8697b1fa87427a Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 4 Mar 2009 00:01:33 +0000 Subject: Small fixes for the bridge configuration. Automatic adding of the bridge module as Michael suggested. Changing the VERSIONS to be in line with the movements towards stable version 5 (latter one is branched, the trunk will run for 5.1 from now on ...) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2666 95ad53e4-c205-0410-b2fa-d234c58c8868 --- VERSIONS | 6 +++--- .../plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm | 24 +++++++++++++++++----- .../init-hooks/20-nw-bridge-config/bridge.sh | 8 ++++---- .../virtualbox/OpenSLX/OSPlugin/virtualbox.pm | 24 +++++++++++++++++----- .../init-hooks/20-nw-bridge-config/bridge.sh | 8 ++++---- .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 14 +++++++++++++ .../init-hooks/20-nw-bridge-config/bridge.sh | 1 + 7 files changed, 64 insertions(+), 21 deletions(-) diff --git a/VERSIONS b/VERSIONS index 00fe1d1d..bab118b5 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,4 +1,4 @@ -OPENSLX_VERSION_MAJOR="4" -OPENSLX_VERSION_MINOR="9" -OPENSLX_VERSION_RELEASE="8" +OPENSLX_VERSION_MAJOR="5" +OPENSLX_VERSION_MINOR="0" +OPENSLX_VERSION_RELEASE="90" OPENSLX_VERSION_STRING="${OPENSLX_VERSION_MAJOR}.${OPENSLX_VERSION_MINOR}.${OPENSLX_VERSION_RELEASE}${OPENSLX_SVN_SNAPSHOT:+rev$OPENSLX_VERSION_SVNREV}" diff --git a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm index 1cd5afaa..2af56f72 100644 --- a/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm +++ b/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm @@ -9,7 +9,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # qemukvm.pm -# - declares necessary information for the qemukvm plugin +# - Declares necessary information for the qemukvm plugin # ----------------------------------------------------------------------------- package OpenSLX::OSPlugin::qemukvm; @@ -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('qemu-kvm') || !isInPath('kvm')) { $engine->installPackages( $engine->getInstallablePackagesForSelection('qemu-kvm') ); } - # 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/qemukvm/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/qemukvm/init-hooks/20-nw-bridge-config/bridge.sh b/os-plugins/plugins/qemukvm/init-hooks/20-nw-bridge-config/bridge.sh index 7503e3ab..c0b8bd31 100644 --- a/os-plugins/plugins/qemukvm/init-hooks/20-nw-bridge-config/bridge.sh +++ b/os-plugins/plugins/qemukvm/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 virtualbox 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} 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} diff --git a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm index 7a4ff531..a930a4e6 100644 --- a/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm +++ b/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm @@ -684,4 +684,18 @@ sub _vmpl1Installation { } +# 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/vmware/init-hooks/20-nw-bridge-config/bridge.sh b/os-plugins/plugins/vmware/init-hooks/20-nw-bridge-config/bridge.sh index 437426db..dad86337 100755 --- a/os-plugins/plugins/vmware/init-hooks/20-nw-bridge-config/bridge.sh +++ b/os-plugins/plugins/vmware/init-hooks/20-nw-bridge-config/bridge.sh @@ -10,6 +10,7 @@ # 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 virtualbox and qemukvm plugins) ############################################################################# local bridge=br0 -- cgit v1.2.3-55-g7522