From ffac729aae46d80133a9fbb6dccdc7e75c576707 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 12 Mar 2008 19:25:06 +0000 Subject: * added support for new action 'list-selections' which shows the available selections for the given vendor-OS - closes ticket #202 git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1628 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/slxos-setup | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'installer/slxos-setup') diff --git a/installer/slxos-setup b/installer/slxos-setup index 0e2aa2a1..1d17048d 100755 --- a/installer/slxos-setup +++ b/installer/slxos-setup @@ -142,6 +142,20 @@ if ($action =~ m[^import]i) { or die _tr("can't chdir to script-path <%> (%s)", $FindBin::RealBin, $!); $engine->initialize($vendorOSName, 'remove'); $engine->removeVendorOS(); +} elsif ($action =~ m[^list-se]i) { + my $vendorOSName = shift @ARGV; + if (!defined $vendorOSName) { + print STDERR _tr("You need to specify exactly one vendor-OS-name!\n"); + pod2usage(2); + } + # 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, $!); + $engine->initialize($vendorOSName, 'install'); + print _tr("List of supported selections for '%s':\n", $vendorOSName); + print join('', map { "\t$_\n" } + sort keys %{$engine->{'distro-info'}->{selection}}); } elsif ($action =~ m[^list-su]i) { print _tr("List of supported distros:\n"); print join('', map { @@ -168,8 +182,9 @@ if ($action =~ m[^import]i) { clone import-into-db install - list-supported list-installed + list-selections + list-supported remove shell update @@ -213,6 +228,10 @@ installs a vendor-OS into a folder show installed vendor-OSes +=item B<< list-selections >> + +show available selections for given vendor-OS + =item B<< list-supported >> show supported distros @@ -284,9 +303,10 @@ If you do not specify any selection, you will get the default selection of that distribution. If you pass an unknown selection, you will see a list of the selections -that are available. +that are available. The available selections for any vendor-OS can be requested +via the 'list-selections' action. -In clone-mode, it is a good idea to specify some unqiue string as the selection +In clone-mode, it is a good idea to specify some unique string as the selection part of the vendor-os-name, such that you will easily recognize the vendor-OS at a later stage. We recommend something like '-cloned-from-'. -- cgit v1.2.3-55-g7522