summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-07 13:29:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-07 13:29:20 +0000
commitbd2443801a43aada5c0b141f2a19ac52ef53fcae (patch)
tree0946d685497a9d15d176bf123f007c29df038f13 /perl-install/standalone
parent06d300a1e541a75434ceb15d19c6e254aedf6dad (diff)
downloaddrakx-bd2443801a43aada5c0b141f2a19ac52ef53fcae.tar
drakx-bd2443801a43aada5c0b141f2a19ac52ef53fcae.tar.gz
drakx-bd2443801a43aada5c0b141f2a19ac52ef53fcae.tar.bz2
drakx-bd2443801a43aada5c0b141f2a19ac52ef53fcae.tar.xz
drakx-bd2443801a43aada5c0b141f2a19ac52ef53fcae.zip
handle --embedded xxx xxx
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/diskdrake19
1 files changed, 12 insertions, 7 deletions
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 260244cf5..7bef9bc9d 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -36,14 +36,19 @@ use log;
use c;
-$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
-if ($::isEmbedded) {
- print "EMBED\n";
- print "parent XID\t$::XID\n";
- print "mcc pid\t$::CCPID\n";
+my %options;
+my @l = @ARGV;
+while (my $e = shift @l) {
+ my ($option) = $e =~ /--?(.*)/ or next;
+ if ($option eq 'embedded') {
+ $::isEmbedded = 1;
+ ($::XID, $::CCPID, @l) = @l;
+ } elsif ($option =~ /(.*?)=(.*)/) {
+ $options{$1} = $2;
+ } else {
+ $options{$option} = '';
+ }
}
-
-my %options = map { /(.*?)=(.*)/ ? ($1,$2) : ($_,'') } map { if_(/--?(.*)/, $1) } @ARGV;
$::expert = delete $options{expert};
$::testing = delete $options{testing};