diff options
Diffstat (limited to 'src/os-plugins/plugins/qemukvm/OpenSLX/Distro')
4 files changed, 172 insertions, 0 deletions
diff --git a/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm new file mode 100644 index 00000000..1e3a9bfe --- /dev/null +++ b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm @@ -0,0 +1,63 @@ +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# qemukvm/OpenSLX/Distro/Base.pm +# - provides base implementation of the Distro API for the qemukvm plugin. +# ----------------------------------------------------------------------------- +package qemukvm::OpenSLX::Distro::Base; + +use strict; +use warnings; + +our $VERSION = 1.01; # API-version . implementation-version + +use Scalar::Util qw( weaken ); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ +sub new +{ + my $class = shift; + my $self = {}; + return bless $self, $class; + +} + +sub initialize +{ + my $self = shift; + my $engine = shift; + weaken($self->{engine}); + # avoid circular reference between plugin and its engine + + return 1; +} + +sub fillRunlevelScript +{ + my $self = shift; + my $location = shift; + my $kind = shift; + + my $script = unshiftHereDoc(<<' End-of-Here'); + + # cpuvirt=$(grep -e "vmx|svm" /proc/cpuinfo) + # modprobe $cpuvirt + + End-of-Here + + return $script; +} + +1; diff --git a/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Debian.pm b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Debian.pm new file mode 100644 index 00000000..6e2cab9b --- /dev/null +++ b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Debian.pm @@ -0,0 +1,43 @@ +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# qemukvm/OpenSLX/Distro/debian.pm +# - provides Debian-specific overrides of the Distro API for the qemukvm +# plugin. +# ----------------------------------------------------------------------------- +package qemukvm::OpenSLX::Distro::Debian; + +use strict; +use warnings; + +use base qw(qemukvm::OpenSLX::Distro::Base); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +sub fillRunlevelScript +{ + my $self = shift; + my $location = shift; + my $kind = shift; + + my $script = unshiftHereDoc(<<' End-of-Here'); + + # something into here ... + + End-of-Here + return $script; +} + +1; diff --git a/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Suse.pm b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Suse.pm new file mode 100644 index 00000000..719dae2b --- /dev/null +++ b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Suse.pm @@ -0,0 +1,42 @@ +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# qemukvm/OpenSLX/Distro/Suse.pm +# - provides SUSE specific overrides of the distro API for the qemukvm +# plugin. +# ----------------------------------------------------------------------------- +package qemukvm::OpenSLX::Distro::Suse; + +use strict; +use warnings; + +use base qw(qemukvm::OpenSLX::Distro::Base); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +sub fillRunlevelScript +{ + my $self = shift; + my $location = shift; + my $kind = shift; + + my $script = unshiftHereDoc(<<' End-of-Here'); + + End-of-Here + + return $script; +} + +1; diff --git a/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Ubuntu.pm b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Ubuntu.pm new file mode 100644 index 00000000..ac764d31 --- /dev/null +++ b/src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Ubuntu.pm @@ -0,0 +1,24 @@ +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# qemukvm/OpenSLX/Distro/Ubuntu.pm +# - provides Ubuntu-specific overrides of the Distro API for the qemukvm +# plugin. +# ----------------------------------------------------------------------------- +package qemukvm::OpenSLX::Distro::Ubuntu; + +use strict; +use warnings; + +# inherit everything from Debian (as Ubuntu is based on it anyway) +use base qw(qemukvm::OpenSLX::Distro::Debian); + + +1; |