diff options
| author | Oliver Tappe | 2007-03-14 18:55:37 +0100 |
|---|---|---|
| committer | Oliver Tappe | 2007-03-14 18:55:37 +0100 |
| commit | 549585a192d8dac687b9f29f7bf581d71b5eb4c6 (patch) | |
| tree | 8eae4fb9237028d4f9939d4f653d2c1158ad4d63 /installer/slxos-setup | |
| parent | * corrected assumption that rsync filters follow a best-match strategy to a f... (diff) | |
| download | core-549585a192d8dac687b9f29f7bf581d71b5eb4c6.tar.gz core-549585a192d8dac687b9f29f7bf581d71b5eb4c6.tar.xz core-549585a192d8dac687b9f29f7bf581d71b5eb4c6.zip | |
* the splitting of vendor-os-name into distro-name and selection-name is now handled
by the engine instead of the slxos-setup script, as that allows for more flexibility
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@768 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/slxos-setup')
| -rwxr-xr-x | installer/slxos-setup | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/installer/slxos-setup b/installer/slxos-setup index 0db7639a..ebac759a 100755 --- a/installer/slxos-setup +++ b/installer/slxos-setup @@ -80,12 +80,6 @@ if ($action !~ m[^clone|import-into-db|install|update$]i) { pod2usage(2); } my $vendorOSName = $ARGV[1]; -if ($vendorOSName !~ m[^(\w+\-[\d.]+)(\-.+)?]) { - print STDERR _tr("Given vendor-OS has unknown format, expected '<name>-<release>[-<selection>]'\n"); - pod2usage(2); -} -my $distroName = $1; -my $selection = $2; # we chdir into the script's folder such that all relative paths have # a known starting point: @@ -95,16 +89,16 @@ chdir($FindBin::RealBin) # create ossetup-engine for given distro and start it: my $engine = OpenSLX::OSSetup::Engine->new; if ($action =~ m[import]i) { - $engine->initialize($distroName, $selection, 0); + $engine->initialize($vendorOSName, 0, 'import'); if (!-e $engine->{'system-path'}) { die _tr("'%s' doesn't exist, giving up!\n", $engine->{'system-path'}); } $engine->addInstalledVendorOSToConfigDB(); } elsif ($action =~ m[update]i) { - $engine->initialize($distroName, $selection, 0); + $engine->initialize($vendorOSName, 0, 'update'); $engine->updateVendorOS(); } elsif ($action =~ m[install]i) { - $engine->initialize($distroName, $selection, 1); + $engine->initialize($vendorOSName, 1, 'install'); $engine->installVendorOS(); } elsif ($action =~ m[clone]i) { if (!length($source)) { @@ -113,14 +107,7 @@ if ($action =~ m[import]i) { if ($source !~ m[^.+::?.+$]) { die _tr("Unkown source format given, expected '<hostname>:<path>' or '<hostname>::<module>'!\n"); } - if (!defined $selection) { - $selection = "cloned-from-$source"; - $selection =~ tr[:/][_]; - # mask : and / - $selection =~ s[_+$][]; - # remove any trailing underscores, as they're ugly - } - $engine->initialize($distroName, $selection, 0, 1); + $engine->initialize($vendorOSName, 0, 'clone'); $engine->cloneVendorOS($source); } |
