diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-06 18:50:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-06 18:50:46 +0000 |
commit | 2c2ebfae2b535da87c05c07fee72a307ed4e71f0 (patch) | |
tree | 315a8b4fba9c8b8bbdb9bf74297f3597602c152c | |
parent | 5aa5243d8c25c2000c691503af65b03648727f99 (diff) | |
download | drakx-2c2ebfae2b535da87c05c07fee72a307ed4e71f0.tar drakx-2c2ebfae2b535da87c05c07fee72a307ed4e71f0.tar.gz drakx-2c2ebfae2b535da87c05c07fee72a307ed4e71f0.tar.bz2 drakx-2c2ebfae2b535da87c05c07fee72a307ed4e71f0.tar.xz drakx-2c2ebfae2b535da87c05c07fee72a307ed4e71f0.zip |
fix old typo: complete callback was not called
-rw-r--r-- | perl-install/any.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index a8bd362f0..491979e99 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -203,8 +203,17 @@ sub setupBootloader__general { $b->{vga} ||= 'normal'; if (arch() !~ /ppc/) { $in->ask_from_({ messages => N("Bootloader main options"), - title => N("Boot Style Configuration"), + title => N("Boot Style Configuration"), interactive_help_id => 'setupBootloader', + callbacks => { + complete => sub { + !$memsize || $memsize =~ /^\d+K$/ || $memsize =~ s/^(\d+)M?$/$1M/i or $in->ask_warn('', N("Give the ram size in MB")), return 1; + #- $security > 4 && length($b->{password}) < 6 and $in->ask_warn('', N("At this level of security, a password (and a good one) in lilo is requested")), return 1; + $b->{restricted} && !$b->{password} and $in->ask_warn('', N("Option ``Restrict command line options'' is of no use without a password")), return 1; + $b->{password} eq $b->{password2} or !$b->{restricted} or $in->ask_warn('', [ N("The passwords do not match"), N("Please try again") ]), return 1; + 0; + }, + }, }, [ { label => N("Bootloader to use"), val => \$b->{method}, list => [ keys %$method_choices ], format => sub { $method_choices->{$_[0]} } }, arch() =~ /sparc/ ? ( @@ -225,14 +234,7 @@ sub setupBootloader__general { if_(detect_devices::isLaptop(), { text => N("Enable multiple profiles"), val => \$profiles, type => 'bool', advanced => 1 }, ), - ], - complete => sub { - !$memsize || $memsize =~ /K$/ || $memsize =~ s/^(\d+)M?$/$1M/i or $in->ask_warn('', N("Give the ram size in MB")), return 1; - #- $security > 4 && length($b->{password}) < 6 and $in->ask_warn('', N("At this level of security, a password (and a good one) in lilo is requested")), return 1; - $b->{restricted} && !$b->{password} and $in->ask_warn('', N("Option ``Restrict command line options'' is of no use without a password")), return 1; - $b->{password} eq $b->{password2} or !$b->{restricted} or $in->ask_warn('', [ N("The passwords do not match"), N("Please try again") ]), return 1; - 0; - }) or return 0; + ]) or return 0; } else { $b->{boot} = $partition_table::mac::bootstrap_part; $in->ask_from_({ messages => N("Bootloader main options"), |