ldap/admin/src/scripts/SetupDialogs.pm.in | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit f2a1d62458458ca9bbceb436642a6cbf2e30c322
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Jan 21 14:50:04 2011 -0700
Bug 624485 - setup dsktune check step should default to "yes" if no problems
found
https://bugzilla.redhat.com/show_bug.cgi?id=624485
Resolves: bug 624485
Bug Description: setup dsktune check step should default to "yes" if no
problems found
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Check the result of the output of running dsktune - if
success, set the default answer to yes, otherwise, to no.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/admin/src/scripts/SetupDialogs.pm.in
b/ldap/admin/src/scripts/SetupDialogs.pm.in
index e925c4b..dd05b04 100644
--- a/ldap/admin/src/scripts/SetupDialogs.pm.in
+++ b/ldap/admin/src/scripts/SetupDialogs.pm.in
@@ -94,7 +94,10 @@ my $dsktune = new DialogYesNo (
['dialog_dsktune_prompt']
);
+$? = 0; # clear error condition
my $dsktune_output = `@bindir@/dsktune`;
+my $dsktune_result = $?;
+$dsktune->{defaultIsYes} = $dsktune_result ? 0 : 1;
$dsktune->{text} = [$dsktune->{text}, $dsktune_output];
my $setuptype = new Dialog (