From e97185912be978df38c53caa74b967b34e9fd63b Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 13 Feb 2007 17:53:25 +0000 Subject: * slightly reworked distribution lookup mechanism git-svn-id: http://svn.openslx.org/svn/openslx/trunk@701 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/slxos-setup | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'installer/slxos-setup') diff --git a/installer/slxos-setup b/installer/slxos-setup index 30aa82dd..55b6f30f 100755 --- a/installer/slxos-setup +++ b/installer/slxos-setup @@ -54,27 +54,11 @@ if ($versionReq) { exit 1; } -my @supportedDistros = ( - 'debian-3.1', - 'debian-4.0', - 'fedora-6', - 'fedora-6-x86_64', - 'mandriva-2007.0', - 'suse-9.3', - 'suse-10.0', - 'suse-10.0-x86_64', - 'suse-10.1', - 'suse-10.1-x86_64', - 'suse-10.2', - 'suse-10.2-x86_64', - 'ubuntu-6.10', -); - openslxInit(); if ($listReq) { print _tr("List of supported distros:\n\t"); - print join("\n\t", @supportedDistros)."\n"; + print join("\n\t", keys %supportedDistros)."\n"; exit 1; } @@ -83,20 +67,14 @@ if (scalar(@ARGV) != 1) { pod2usage(2); } -my $distroName = $ARGV[0]; -if (!grep { /^$distroName$/ } @supportedDistros) { - print _tr("Sorry, distro '%s' is unsupported.\n", $distroName); - print _tr("List of supported distros:\n\t"); - print join("\n\t", @supportedDistros)."\n"; - exit 1; -} - # we chdir into the script's folder such that all relative paths have # a known starting point: chdir($FindBin::RealBin) or die _tr("can't chdir to script-path <%> (%s)", $FindBin::RealBin, $!); -# create ossetup-engine and start it: + +# create ossetup-engine for given distro and start it: +my $distroName = $ARGV[0]; my $engine = OpenSLX::OSSetup::Engine->new; if ($setupRepos) { $engine->initialize($distroName, 0); -- cgit v1.2.3-55-g7522