diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-01-27 20:56:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-01-27 20:56:29 +0000 |
commit | 897140cfc593b9697dfa383eacaf14affe44edf2 (patch) | |
tree | 112469d8709a9c5f7924b9a952040e922272d7cf /perl-install/standalone | |
parent | b952046fe76751a3456921a6cd163ee84e8f3f49 (diff) | |
download | drakx-backup-do-not-use-897140cfc593b9697dfa383eacaf14affe44edf2.tar drakx-backup-do-not-use-897140cfc593b9697dfa383eacaf14affe44edf2.tar.gz drakx-backup-do-not-use-897140cfc593b9697dfa383eacaf14affe44edf2.tar.bz2 drakx-backup-do-not-use-897140cfc593b9697dfa383eacaf14affe44edf2.tar.xz drakx-backup-do-not-use-897140cfc593b9697dfa383eacaf14affe44edf2.zip |
handle --removable *and* --removable=<dev>
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/diskdrake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 5578abd1f..260244cf5 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -58,8 +58,6 @@ foreach (@types) { } %options and die "usage: diskdrake [--expert] [--testing] [--{" . join(",", @types) . "}]\n"; -$type ne 'removable' || $para or die "usage: diskdrake --removable=<dev>\n"; - if ($>) { $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; } @@ -104,7 +102,9 @@ if ($type eq 'hd') { } elsif ($type eq 'removable') { require diskdrake::removable; $para =~ s|^/dev/||; - my ($raw_hd) = grep { $para eq $_->{device} } @{$all_hds->{raw_hds}} or die "unknown removable $para\n"; + my ($raw_hd) = $para ? + first(grep { $para eq $_->{device} } @{$all_hds->{raw_hds}}) || die "unknown removable $para\n" : + $in->ask_from_listf('', '', \&diskdrake::interactive::format_raw_hd_info, $all_hds->{raw_hds}) or $in->exit(0); diskdrake::removable::main($in, $all_hds, $raw_hd); } else { $in->ask_warn('', "Sorry only a gtk frontend is available") if !$in->isa('interactive_gtk'); |