From 4ac921c5f12fb35051eb8bf65b480d57ce4f2068 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 16 Mar 2007 21:57:29 +0000 Subject: * changed option to show the supported distros from '--list' to '--list-supported' * added option '--list-installed' which gives a list of installed vendor-OSes git-svn-id: http://svn.openslx.org/svn/openslx/trunk@775 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/slxos-setup | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'installer/slxos-setup') diff --git a/installer/slxos-setup b/installer/slxos-setup index 75d562c3..71a2d948 100755 --- a/installer/slxos-setup +++ b/installer/slxos-setup @@ -35,8 +35,9 @@ if ($> != 0) { my ( $helpReq, + $listInstalledReq, + $listSupportedReq, $manReq, - $listReq, $source, $verbose, $versionReq, @@ -44,7 +45,8 @@ my ( GetOptions( 'help|?' => \$helpReq, - 'list' => \$listReq, + 'list-installed' => \$listInstalledReq, + 'list-supported' => \$listSupportedReq, 'man' => \$manReq, 'source=s' => \$source, 'verbose' => \$verbose, @@ -59,7 +61,7 @@ if ($versionReq) { openslxInit(); -if ($listReq) { +if ($listSupportedReq) { print _tr("List of supported distros:\n"); print join('', map { "\t$_" @@ -69,6 +71,15 @@ if ($listReq) { sort keys %supportedDistros); exit 1; } +if ($listInstalledReq) { + print _tr("List of installed vendor-OSes:\n"); + print join('', map { + s[^.+/][]; + "\t$_\n"; + } + sort <$openslxConfig{'stage1-path'}/*>); + exit 1; +} if (scalar(@ARGV) != 2) { print STDERR _tr("You need to specify exactly one action and one vendor-OS name!\n"); @@ -142,7 +153,8 @@ will be used as a OpenSLX-stage1-system (a.k.a. vendor-OS). Options: --help brief help message - --list show supported distros + --list-installed show installed vendor-OSes + --list-supported show supported distros --man show full documentation --source= (rsync-)source to clone vendor-OS from --version show version @@ -161,7 +173,11 @@ will be used as a OpenSLX-stage1-system (a.k.a. vendor-OS). Prints a brief help message and exits. -=item B<--list> +=item B<--list-installed> + +Lists all installed vendor-OSes and exits. + +=item B<--list-supported> Lists all supported distros and exits. -- cgit v1.2.3-55-g7522