All pastes #558954 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-11 15:58 UTC
rendered paste body
Index: etc/antinstall/antinstall-config-component.xml
===================================================================
--- etc/antinstall/antinstall-config-component.xml	(revision 7047)
+++ etc/antinstall/antinstall-config-component.xml	(working copy)
@@ -87,7 +87,7 @@
       name="properties_ldap_ldapserver"

       title="Authentication Manager Configuration"

       subtitle="Specify the information needed to query the LDAP server"
-      postDisplayTarget="component_ldap_post_check_ldap">
+      postDisplayTarget="component_ldap_post_check_ldap_server">
     <comment displayText="Specify the contact information for the LDAP server and the LDAP default base Distinguished Name. ${CONTINUE}"/>

     <ext-validated  displayText="Name of the host on which the LDAP server is located"
           defaultValue="${local.host}"
@@ -105,30 +105,11 @@
     <text property="ldap.base" displayText="Default base Distinguished Name (example: 'ou=People,dc=nice-italy,dc=com)" defaultValue=""/>
   </page>
 
-<!--

   <page

       ifTarget="component_ldap"

-      ifProperty="(${default.auth.mgr}==ldap) AND (${ldap.servercheck.failed}==true)"

+      ifProperty="(${default.auth.mgr}==ldap) AND (${ldap.servercheck.failed}==false)"

       type="input"

-      name="properties_ldap_ldapcheckserver_ignore"

-      title="Authentication Manager Configuration"

-      subtitle="Choose authentication options"

-      postDisplayTarget="component_ldap_post_check_ldap">

-    <comment displayText="Current settings:"/>

-    <comment displayText=" LDAP Server: ${ldap.server}"/>

-    <comment displayText=" LDAP Port: ${ldap.port}"/>

-    <select displayText="Choose to ignore the test, then click Next." property="ldap.servercheck.ignore" defaultValue="false">

-      <option text="Yes" value="true"/>

-      <option text="No" value="false"/>

-    </select>

-  </page>

--->
-

-  <page

-      ifTarget="component_ldap"

-      ifProperty="${default.auth.mgr}==ldap"

-      type="input"

-      name="properties_ldap_username_password_step1"

+      name="properties_ldap_username_password"

       title="@COMPONENT_NAME@ Configuration"

       subtitle="Specify username and password to test authentication"

       postDisplayTarget="component_ldap_post_check_ldap_auth">

@@ -137,22 +118,6 @@
   </page>

 

   <page

-      ifTarget="component_ldap"

-      ifProperty="(${default.auth.mgr}==ldap) AND (${ldap.authcheck.failed}==true)"

-      type="input"

-      name="properties_ldap_username_password_step2"

-      title="@COMPONENT_NAME@ Configuration"

-      subtitle="Specify username and password to test authentication"

-      postDisplayTarget="component_ldap_post_check_ldap_auth">

-    <text property="ldap.user" displayText="Username" defaultValue=""/>

-    <password property="ldap.userpw" displayText="Password" textMask="true" regex="^.*$" defaultValue=""/>

-    <select displayText="Choose to skip authentication check, then click Next." property="ldap.authcheck.ignore" defaultValue="false">

-      <option text="Yes" value="true"/>

-      <option text="No" value="false"/>

-    </select>

-  </page>
-
-  <page

       type="progress"

       name="progress"

       title="Installation progress"

Index: etc/antinstall/build-component.xml
===================================================================
--- etc/antinstall/build-component.xml	(revision 7047)
+++ etc/antinstall/build-component.xml	(working copy)
@@ -41,81 +41,85 @@ This is the build.xml run by AntInstalle
 		<antinstaller-property name="local.host" value="${local.host}"/>
 	</target>
 
-	<target name="component_ldap_post_check_ldap_auth">
-		<taskdef resource="net/sf/antcontrib/antlib.xml"/>
-		<if>
-			<equals arg1="${ldap.secure}" arg2="true"/>
-			<then>
-				<property name="ldap.options" value="-Z"/>
-			</then>
-			<else>
-				<property name="ldap.options" value=""/>
-			</else>
-		</if>
-
-		<property name="ldapcheckauth.argline" value="-x -n ${ldap.options} -h ${ldap.server} -p ${ldap.port} -b ${ldap.base} -D uid=${ldap.user},${ldap.base} -w"/>
-		<antinstaller-log message="Calling ${ldap.ldapsearch} ${ldapcheckauth.argline} password"/>
-
-		<exec executable="${ldap.ldapsearch}" resultproperty="ldap.authcheck.res">
-			<arg line="${ldapcheckauth.argline} ${ldap.userpw}"/>
-		</exec>
-
-		<antinstaller-log message="Result: ${ldap.authcheck.res}"/>
-
-		<if>
-			<equals arg1="${ldap.authcheck.res}" arg2="0"/>
-			<then>
-				<antinstaller-property name="ldap.authcheck.failed" value="false"/>
-			</then>
-			<else>
-				<antinstaller-message message="Unable to log on LDAP Server. Exit code: ${ldap.authcheck.res}"/>
-				<antinstaller-property name="ldap.authcheck.failed" value="true"/>
-				<if>
-					<equals arg1="ldap.authcheck.ignore" arg2="false"/>
-					<then>
-						<fail message="Unable to log on LDAP Server. Exit code: ${ldap.authcheck.res}"/>
-					</then>
-				</if>
-			</else>
-		</if>
-	</target>
+    <target name="component_ldap_post_check_ldap_server">
+        <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+        <if>
+            <equals arg1="${ldap.secure}" arg2="true"/>
+            <then>
+                <property name="ldap.options" value="-Z"/>
+            </then>
+            <else>
+                <property name="ldap.options" value=""/>
+            </else>
+        </if>
+        <property name="ldapcheck.argline" value="-x ${ldap.options} -h ${ldap.server} -p ${ldap.port} -b ${ldap.base}"/>
+        <antinstaller-log message="Calling ${ldap.ldapsearch} ${ldapcheck.argline}"/>
 
-	<target name="component_ldap_post_check_ldap">
-		<taskdef resource="net/sf/antcontrib/antlib.xml"/>
-		<if>
-			<equals arg1="${ldap.secure}" arg2="true"/>
-			<then>
-				<property name="ldap.options" value="-Z"/>
-			</then>
-			<else>
-				<property name="ldap.options" value=""/>
-			</else>
-		</if>
-		<property name="ldapcheck.argline" value="-x ${ldap.options} -h ${ldap.server} -p ${ldap.port} -b ${ldap.base}"/>
-		<antinstaller-log message="Calling ${ldap.ldapsearch} ${ldapcheck.argline}"/>
-
-		<exec executable="${ldap.ldapsearch}" resultproperty="ldap.servercheck.res">
-			<arg line="${ldapcheck.argline}"/>
-		</exec>
-		<antinstaller-log message="Result: ${ldap.servercheck.res}"/>
-
-		<if>
-			<equals arg1="${ldap.servercheck.res}" arg2="0"/>
-			<then>
-				<antinstaller-property name="ldap.servercheck.failed" value="false"/>
-			</then>
-			<else>
-				<antinstaller-message message="Unable to contact LDAP Server. Exit code: ${ldap.servercheck.res}"/>
-				<antinstaller-property name="ldap.servercheck.failed" value="true"/>
-				<if>
-					<equals arg1="ldap.servercheck.ignore" arg2="false"/>
-					<then>
-						<fail message="Unable to contact LDAP Server. Exit code: ${ldap.servercheck.res}"/>
-					</then>
-				</if>
-			</else>
-		</if>
-	</target>
+        <exec executable="${ldap.ldapsearch}" resultproperty="ldap.servercheck.res">
+            <arg line="${ldapcheck.argline}"/>
+        </exec>
+        <antinstaller-log message="Result: ${ldap.servercheck.res}"/>
+
+        <if>
+            <equals arg1="${ldap.servercheck.res}" arg2="0"/>
+            <then>
+                <antinstaller-property name="ldap.servercheck.failed" value="false"/>
+            </then>
+            <else>
+                <antinstaller-property name="ldap.servercheck.failed" value="true"/>
+                <antinstaller-prompt message="Unable to contact LDAP Server. Do you want to skip this check and continue the installation?" property="continue"/>
+                <if>
+                    <equals arg1="${continue}" arg2="yes"/>
+                    <then>
+                        <antinstaller-log message="Skipping LDAP credentials check."/>
+                    </then>
+                    <else>
+                        <fail message="Could not contact LDAP Server. Exit code: ${ldap.servercheck.res}"/>
+                    </else>
+                </if>
+            </else>
+        </if>
+    </target>
+
+    <target name="component_ldap_post_check_ldap_auth">
+        <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+        <if>
+            <equals arg1="${ldap.secure}" arg2="true"/>
+            <then>
+                <property name="ldap.options" value="-Z"/>
+            </then>
+            <else>
+                <property name="ldap.options" value=""/>
+            </else>
+        </if>
+        <property name="ldapcheckauth.argline" value="-x -n ${ldap.options} -h ${ldap.server} -p ${ldap.port} -b ${ldap.base} -D uid=${ldap.user},${ldap.base} -w"/>
+        <antinstaller-log message="Calling ${ldap.ldapsearch} ${ldapcheckauth.argline} password"/>
+
+        <exec executable="${ldap.ldapsearch}" resultproperty="ldap.authcheck.res">
+            <arg line="${ldapcheckauth.argline} ${ldap.userpw}"/>
+        </exec>
+        <antinstaller-log message="Result: ${ldap.authcheck.res}"/>
+
+        <if>
+            <equals arg1="${ldap.authcheck.res}" arg2="0"/>
+            <then>
+                <antinstaller-property name="ldap.authcheck.failed" value="false"/>
+            </then>
+            <else>
+                <antinstaller-property name="ldap.authcheck.failed" value="true"/>
+                <antinstaller-prompt message="Unable to log on LDAP Server. Do you want to skip this check and continue the installation?" property="continue"/>
+                <if>
+                    <equals arg1="${continue}" arg2="yes"/>
+                    <then>
+                        <antinstaller-log message="Skipping LDAP credentials check."/>
+                    </then>
+                    <else>
+                        <fail message="Unable to log on LDAP Server. Exit code: ${ldap.authcheck.res}"/>
+                    </else>
+                </if>
+            </else>
+        </if>
+    </target>
 
     <target name="component_ldap_enable">
         <taskdef resource="net/sf/antcontrib/antlib.xml"/>
@@ -187,4 +191,4 @@ This is the build.xml run by AntInstalle
 
 	<target name="cleanuptarget" depends="">
 	</target>
-</project>
\ No newline at end of file
+</project>