Explorar el Código

Resolves: bug 237356
Description: Move DS Admin Code into Admin Server - dsktune
Fix Description: This adds the dsktune dialog to the initial list of setup dialogs.
Platforms tested: RHEL4

Rich Megginson hace 18 años
padre
commit
10d068b8dd

+ 20 - 1
ldap/admin/src/scripts/SetupDialogs.pm.in

@@ -78,6 +78,25 @@ my $license = new DialogYesNo (
     ['dialog_license_prompt']
 );
 
+my $dsktune = new DialogYesNo (
+    $EXPRESS,
+    'dialog_dsktune_text',
+    0,
+    sub {
+        my $self = shift;
+        my $ans = shift;
+        my $res = $self->handleResponse($ans);
+        if ($res == $DialogManager::NEXT) {
+            $res = $DialogManager::ERR if (!$self->isYes());
+        }
+        return $res;
+    },
+    ['dialog_dsktune_prompt']
+);
+
+my $dsktune_output = `@bindir@/dsktune`;
+$dsktune->{text} = [$dsktune->{text}, $dsktune_output];
+
 my $setuptype = new Dialog (
     $EXPRESS,
     'dialog_setuptype_text',
@@ -250,7 +269,7 @@ my $usergroup = new Dialog (
 
 
 sub getDialogs {
-    return ($welcome, $license, $setuptype, $hostdlg, $usergroup);
+    return ($welcome, $license, $dsktune, $setuptype, $hostdlg, $usergroup);
 }
 
 sub getRegDialogs {

+ 6 - 0
ldap/admin/src/scripts/setup-ds.res.in

@@ -17,6 +17,12 @@ dialog_license_text = BY SETTING UP AND USING THIS SOFTWARE YOU ARE CONSENTING T
 
 dialog_license_prompt = Do you agree to the license terms?
 
+# ----------- dsktune Dialog Resource  -----------
+dialog_dsktune_text = Your system has been scanned for potential problems, missing patches,\
+etc.  The following output is a report of the items found that need to\
+be addressed before running this software in a production\
+environment.\n\n%s
+dialog_dsktune_prompt = Would you like to continue?
 
 # ----------- Setup Type Dialog Resource  ----------------
 dialog_setuptype_text = Choose a setup type:\n\n   1. Express\n       Allows you to quickly setup the servers using the most\n       common options and pre-defined defaults. Useful for quick\n       evaluation of the products.\n\n   2. Typical\n       Allows you to specify common defaults and options.\n\n   3. Custom\n       Allows you to specify more advanced options. This is \n       recommended for experienced server administrators only.\n\nTo accept the default shown in brackets, press the Enter key.\n\n