summaryrefslogtreecommitdiffstats
path: root/initramfs/OpenSLX/MakeInitRamFS/Engine.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-04-06 15:40:09 +0200
committerOliver Tappe2008-04-06 15:40:09 +0200
commit5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d (patch)
tree036281d5a9b6d847c4bfc92f3c52f96a6ada2df0 /initramfs/OpenSLX/MakeInitRamFS/Engine.pm
parent* Instead of passing all known attributes of the current system into each plu... (diff)
downloadcore-5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d.tar.gz
core-5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d.tar.xz
core-5a8c8a1638eea2ff6897046fcbc94bb42ccbe94d.zip
* made names of distro module consistent across OpenSLX - now the always start with
a capital letter followed by all lowercase (Debian, Fedora, Gentoo, Suse, Ubuntu) * refactored loading of distro modules into a separate function (loadDistroModule() in Basics.pm) * finished support to logging to a file in syslog plugin * worked at desktop plugin (still not working, though) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1721 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/OpenSLX/MakeInitRamFS/Engine.pm')
-rw-r--r--initramfs/OpenSLX/MakeInitRamFS/Engine.pm17
1 files changed, 7 insertions, 10 deletions
diff --git a/initramfs/OpenSLX/MakeInitRamFS/Engine.pm b/initramfs/OpenSLX/MakeInitRamFS/Engine.pm
index 43374e9e..efa8d1de 100644
--- a/initramfs/OpenSLX/MakeInitRamFS/Engine.pm
+++ b/initramfs/OpenSLX/MakeInitRamFS/Engine.pm
@@ -58,18 +58,15 @@ sub new
$self->{'system-name'} =~ m{^([^\-]+)-([^:\-]+)}
or die "unable to extract distro-info from $self->{'system-name'}!";
- $self->{'distro-name'} = $1;
+ $self->{'distro-name'} = lc($1);
$self->{'distro-ver'} = $2;
- my %distroMap = (
- 'debian' => 'Debian',
- 'suse' => 'SUSE',
- 'ubuntu' => 'Ubuntu',
- );
- my $distroModule = $distroMap{$self->{'distro-name'}} || 'Base';
- $self->{distro} = instantiateClass(
- "OpenSLX::MakeInitRamFS::Distro::$distroModule"
- );
+ my $distroModule
+ = 'OpenSLX::MakeInitRamFS::Distro::' . ucfirst($self->{'distro-name'});
+ if (!eval { $self->{distro} = instantiateClass($distroModule); }) {
+ $self->{distro}
+ = instantiateClass('OpenSLX::MakeInitRamFS::Distro::Base');
+ }
$self->{'lib-scanner'}
= OpenSLX::LibScanner->new({ 'root-path' => $self->{'root-path'} });