diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-12-27 12:55:19 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-12-27 12:55:19 +0000 |
commit | e996c2ca413a4c88283f7ff2511ce51816b0d3c6 (patch) | |
tree | 34ee8a9bf1c34aaff708556bd0c0f69d11d8afe6 | |
parent | 81763691511266a513b819d75c40c35df04c63ef (diff) | |
download | drakx-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar drakx-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar.gz drakx-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar.bz2 drakx-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.tar.xz drakx-e996c2ca413a4c88283f7ff2511ce51816b0d3c6.zip |
don't allow to go on if no device is selected (thanks to Sylvie \o/)
-rwxr-xr-x | tools/draklive | 7 |
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; |