summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorOliver Tappe2007-07-20 16:18:00 +0200
committerOliver Tappe2007-07-20 16:18:00 +0200
commitc757526e9a9b6923fe4bfb45867368a0010e2417 (patch)
tree3579790b3c506e4a803d28f33376d1125e2dea40 /installer
parentForgot to remove the debugging output for fileget ... (diff)
downloadcore-c757526e9a9b6923fe4bfb45867368a0010e2417.tar.gz
core-c757526e9a9b6923fe4bfb45867368a0010e2417.tar.xz
core-c757526e9a9b6923fe4bfb45867368a0010e2417.zip
* fixed (another) problem when trying to import a vendor-OS that isn't fully
supported (which can only be cloned). This time, things work not only for Debian (for which empty Distro-modules exist), but for *all* distributions. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1263 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm21
1 files changed, 13 insertions, 8 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index e160377d..5737814b 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -164,17 +164,22 @@ sub initialize
}
# load module for the requested distro:
- my $distroClass;
- if ($actionType eq 'clone') {
- # force generic clone module, such that we can clone
- # distro's for which there is no specific distro-module yet
- # (like for example for Gentoo):
- $distroClass = "Any_Clone";
+ my $distro;
+ my $distroClass = $supportedDistros{lc($distroName)}->{module};
+ if ($actionType =~ m{^(install|update|shell)}) {
+ $distro = instantiateClass($distroClass);
}
else {
- $distroClass = $supportedDistros{lc($distroName)}->{module};
+ if (!eval {
+ $distro = instantiateClass("OpenSLX::OSSetup::Distro::$distroClass")
+ }) {
+ # allow fallback to generic clone module, such that we can clone
+ # distro's for which there is no specific distro-module yet
+ # (like for example for Gentoo):
+ $distro = instantiateClass("OpenSLX::OSSetup::Distro::Any_Clone")
+ }
}
- my $distro = instantiateClass("OpenSLX::OSSetup::Distro::$distroClass");
+
$distro->initialize($self);
$self->{distro} = $distro;