From ab153cf663a17e7c853af15e7819bc46ae2556d5 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 1 Apr 2007 13:04:14 +0000 Subject: * fiddled with the arguments to clone in order to be more consistent across different scripts: + the source-uri has to be given *before* the vendor-os-name (so the cmdline can be read like 'clone ' + when specifying the source, you no longer need to give 'source=' in front, you just pass the rsync-uri git-svn-id: http://svn.openslx.org/svn/openslx/trunk@844 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/slxos-setup | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'installer/slxos-setup') diff --git a/installer/slxos-setup b/installer/slxos-setup index 50b12f82..10731be2 100755 --- a/installer/slxos-setup +++ b/installer/slxos-setup @@ -108,13 +108,12 @@ if ($action =~ m[^import]i) { $engine->initialize($vendorOSName, 'install'); $engine->installVendorOS(); } elsif ($action =~ m[^clone]i) { + my $source = shift @ARGV; my $vendorOSName = shift @ARGV; - my $srcString = shift @ARGV; - if ($srcString !~ m[^\s*source=(.+?)\s*$]) { - print STDERR _tr("You need to specify a source you'd like to clone!\n"); + if (!defined $source || !defined $vendorOSName) { + print STDERR _tr("You need to specify exactly one source and one vendor-OS-name!\n"); pod2usage(2); } - my $source = $1; if ($source !~ m[^.+::?.+$]) { die _tr("Unkown source format given, expected ':' or '::'!\n"); } @@ -159,7 +158,7 @@ will be used as a OpenSLX-stage1-system (a.k.a. vendor-OS). =head1 SYNOPSIS - slxos-setup [options] + slxos-setup [options] ... Options: --help brief help message @@ -168,7 +167,7 @@ will be used as a OpenSLX-stage1-system (a.k.a. vendor-OS). --version show version Actions: - clone source= + clone clones an existing operating system via rsync import-into-db imports a vendor-OS into the openslx-db @@ -228,7 +227,7 @@ In clone-mode, it is a good idea to specify some unqiue 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-'. -=item B +=item B When cloning a vendor-OS, slxos-setup needs to know where to fetch the existing OS-files from. Please check the 'rsync' docs for what @@ -250,7 +249,7 @@ format an rsync-uri has. =head2 Cloning an Operating System to Make a New Vendor-OS - slxos-setup clone suse-10.2-clone-my_server source=my_server:/ + slxos-setup clone my_server:/ suse-10.2-clone-my_server clones the suse-10.2 system from server 'my_server' as a new vendor-OS, which will be named 'suse-10.2-clone-my_server' -- cgit v1.2.3-55-g7522