Changeset 10770 for trunk/gsdl3


Ignore:
Timestamp:
2005-10-26T13:14:32+13:00 (19 years ago)
Author:
kjdon
Message:

changed the get-mysql-xxx-password targets - there is now one for each password, and has 'unless=mysql.xxx.password' - so you can't have an empty password property and still get the prompt. the java getuserandpassword property doesn't work if no windows (eg ssh login) and it craps out even if you don't need to run it, so you need to test for the existence of the password before running it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/build.xml

    r10766 r10770  
    420420  </target>
    421421 
    422   <target name="configure-web" depends="init,get-mysql-gsdl3-passwords"
     422  <target name="configure-web" depends="init,get-mysql-reader-password,get-mysql-admin-password"
    423423    description="Configure only the web app config files">
    424424    <!-- we want a unix path in the global.properties file -->
     
    650650  <target name="configure-mysql" depends="init,init-mysql-vars,start-mysql,set-mysql-account-passwords,stop-mysql" description="sets up the mysql account passwords"/>
    651651 
    652   <target name="get-mysql-root-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword">
    653      <condition property="ask.root.password">
    654       <or>
    655     <not>
    656       <isset property="mysql.root.password"/>
    657     </not>
    658     <equals arg1="" arg2="${mysql.root.password}"/>
    659       </or>
    660     </condition>
    661     <getuserandpassword message="Please specify a password for the root mysql user: this is to secure your database." if="ask.root.password" username="root" pwordproperty="mysql.root.password"/>
    662   </target>
    663  
    664   <target name="get-mysql-gsdl3-passwords" depends="init,init-mysql-vars" if="mysql.islocal.usepassword">
    665     <condition property="ask.admin.password">
    666       <or>
    667     <not>
    668       <isset property="mysql.admin.password"/>
    669     </not>
    670     <equals arg1="" arg2="${mysql.admin.password}"/>
    671       </or>
    672     </condition>
    673      <condition property="ask.reader.password">
    674       <or>
    675     <not>
    676       <isset property="mysql.reader.password"/>
    677     </not>
    678     <equals arg1="" arg2="${mysql.reader.password}"/>
    679       </or>
    680     </condition>
    681     <getuserandpassword message="Please specify the password for the gsdl3admin mysql user: this is used by greenstone" if="ask.admin.password" username="gsdl3admin" pwordproperty="mysql.admin.password"/>
    682      <getuserandpassword message="Please specify the password for the gsdl3reader mysql user: this is used by greenstone" if="ask.reader.password" username="gsdl3reader" pwordproperty="mysql.reader.password"/>
    683  </target>
     652  <target name="get-mysql-root-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword" unless="mysql.root.password">
     653    <getuserandpassword message="Please specify a password for the root mysql user: this is to secure your database."  username="root" pwordproperty="mysql.root.password"/>
     654  </target>
     655 
     656  <target name="get-mysql-reader-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword" unless="mysql.reader.password" >
     657    <getuserandpassword message="Please specify the password for the gsdl3reader mysql user: this is used by greenstone" username="gsdl3reader" pwordproperty="mysql.reader.password"/>
     658  </target>
     659 
     660  <target name="get-mysql-admin-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword" unless="mysql.admin.password" >
     661    <getuserandpassword message="Please specify the password for the gsdl3admin mysql user: this is used by greenstone" username="gsdl3admin" pwordproperty="mysql.admin.password"/>
     662  </target>
    684663
    685664 <target name="install-mysql" depends="init,init-mysql-vars,install-mysql-linux,install-mysql-windows,install-mysql-mac"/>
     
    788767  </target>
    789768
    790   <target name="set-mysql-account-passwords" depends="init,init-mysql-vars,get-mysql-root-password,get-mysql-gsdl3-passwords" if="mysql.islocal.usepassword">
     769  <target name="set-mysql-account-passwords" depends="init,init-mysql-vars,get-mysql-root-password,get-mysql-reader-password,get-mysql-admin-password" if="mysql.islocal.usepassword">
    791770    <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
    792771      <arg value="--user=root"/>
Note: See TracChangeset for help on using the changeset viewer.