summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-12-27 12:55:19 +0000
committerOlivier Blin <oblin@mandriva.org>2005-12-27 12:55:19 +0000
commite996c2ca413a4c88283f7ff2511ce51816b0d3c6 (patch)
tree34ee8a9bf1c34aaff708556bd0c0f69d11d8afe6 /tools
parent81763691511266a513b819d75c40c35df04c63ef (diff)
downloaddrakx-backup-do-not-use-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar
drakx-backup-do-not-use-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar.gz
drakx-backup-do-not-use-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar.bz2
drakx-backup-do-not-use-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar.xz
drakx-backup-do-not-use-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.zip
don't allow to go on if no device is selected (thanks to Sylvie \o/)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/draklive7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/draklive b/tools/draklive
index 1ad600567..b2245b0d7 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -714,11 +714,18 @@ sub copy_wizard {
}
delete $devices{$_->{rootDevice}} foreach @available_devices;
unshift @available_devices, map { $devices{$_} } sort keys %devices;
+ undef $device;
},
data => [ { type => 'list', allow_empty_list => 1,
val => \$device, , list => \@available_devices,
format => sub { $_[0]->{formatted_name} } },
{ text => N("Format selected device"), val => \$format, type => 'bool' } ],
+ complete => sub {
+ unless (defined $device) {
+ $in->ask_warn(N("Error"), N("You must select a device!"));
+ return 1;
+ }
+ },
post => sub {
my $media = { media => { storage => $storage, device => '/dev/' . $device->{device} } };
format_device($live, $media) if $format;