From bd2443801a43aada5c0b141f2a19ac52ef53fcae Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 7 Feb 2002 13:29:20 +0000 Subject: handle --embedded xxx xxx --- perl-install/standalone/diskdrake | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'perl-install/standalone/diskdrake') 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}; -- cgit v1.2.1