summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/diskdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-27 20:56:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-27 20:56:29 +0000
commit897140cfc593b9697dfa383eacaf14affe44edf2 (patch)
tree112469d8709a9c5f7924b9a952040e922272d7cf /perl-install/standalone/diskdrake
parentb952046fe76751a3456921a6cd163ee84e8f3f49 (diff)
downloaddrakx-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/diskdrake')
-rwxr-xr-xperl-install/standalone/diskdrake6
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');