From dae8a3a9b97cedf4d4066239693da20aceba5f23 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 3 Feb 2010 23:38:00 +0000 Subject: (setupBootloader__general) make restrict's 'validate' callback more readable --- perl-install/any.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index 492d8da4f..0a5df8811 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -427,8 +427,12 @@ sub setupBootloader__general { } }, { label => N("Password (again)"), val => \$b->{password2}, hidden => 1 }, { text => N("Restrict command line options"), val => \$b->{restricted}, type => "bool", - text => N("restrict"), advanced => 1 - validate => sub { my $ok = !$b->{restricted} || $b->{password} or $in->ask_warn('', N("Option ``Restrict command line options'' is of no use without a password")); $ok } }, + text => N("restrict"), advanced => 1, + validate => sub { + my $ok = !$b->{restricted} || $b->{password} + or $in->ask_warn('', N("Option ``Restrict command line options'' is of no use without a password")); + $ok; + } }, { text => N("Clean /tmp at each boot"), val => \$clean_tmp, type => 'bool', advanced => 1 }, ]) or return 0; } else { -- cgit v1.2.1