From c29aadbbfac97a8e4e5827330a5e2987b7a63b4a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 7 Aug 2007 14:59:07 +0000 Subject: (check_security_level) split it out of miscellaneous() --- perl-install/install/steps_interactive.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'perl-install/install') diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index acf5fc2b4..f315507ef 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -997,6 +997,14 @@ try to force installation even if that destroys the first partition?")); } } +sub check_security_level { + my ($o) = @_; + if ($o->{security} > 2 && find { $_->{fs_type} eq 'vfat' } @{$o->{fstab}}) { + $o->ask_okcancel('', N("In this security level, access to the files in the Windows partition is restricted to the administrator.")) or return 0; + } + return 1; +} + sub miscellaneous { my ($o, $_clicked) = @_; @@ -1004,10 +1012,7 @@ sub miscellaneous { require security::level; security::level::level_choose($o, \$o->{security}, \$o->{libsafe}, \$o->{security_user}); - if ($o->{security} > 2 && find { $_->{fs_type} eq 'vfat' } @{$o->{fstab}}) { - $o->ask_okcancel('', N("In this security level, access to the files in the Windows partition is restricted to the administrator.")) - or goto &miscellaneous; - } + check_security_level($o) or goto &miscellaneous; } install::steps::miscellaneous($o); -- cgit v1.2.1