Index: openacs-4/etc/install/config.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/Attic/config.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/etc/install/config.tcl 8 Sep 2003 08:53:59 -0000 1.7 +++ openacs-4/etc/install/config.tcl 10 Sep 2003 09:57:12 -0000 1.8 @@ -30,6 +30,7 @@ # the default server control parameters use daemontools set use_daemontools "true" +set svc_bindir "/usr/local/bin" # Link from this dir. Don't use trailing slash. set svscanroot "/var/lib/svscan/${server}" # Link to this dir @@ -92,3 +93,5 @@ set openacs_output_file "${serverroot}/log/install-openacs-data-model-output.html" set openacs_packages_output_file "${serverroot}/log/install-openacs-packages-install-output.html" set apm_output_file "${serverroot}/log/install-apm-packages-output.html" +# Where all errors in the log file during installation are collected +set log_error_file "${serverroot}/log/install-log-errors" Index: openacs-4/etc/install/functions.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/functions.sh,v diff -u -r1.2 -r1.3 --- openacs-4/etc/install/functions.sh 8 Sep 2003 12:19:17 -0000 1.2 +++ openacs-4/etc/install/functions.sh 10 Sep 2003 09:57:12 -0000 1.3 @@ -1,7 +1,7 @@ # Access config parameters in the TCL file through this function get_config_param () { - echo "source $source_config_file; puts [set $1]" | tclsh + echo "source $config_file; puts [set $1]" | tclsh } create_override_config_file () { @@ -13,9 +13,7 @@ if [ ! -a $override_config_file ]; then echo "set server $server" > $override_config_file cat $config_file | egrep -v '^[[:space:]]*set[[:space:]]+server[[:space:]]+' >> $override_config_file - export source_config_file=$override_config_file -else - export source_config_file=$config_file + export config_file=$override_config_file fi } Index: openacs-4/etc/install/install-and-alert.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/install-and-alert.sh,v diff -u -r1.3 -r1.4 --- openacs-4/etc/install/install-and-alert.sh 8 Sep 2003 12:19:18 -0000 1.3 +++ openacs-4/etc/install/install-and-alert.sh 10 Sep 2003 09:57:12 -0000 1.4 @@ -51,8 +51,6 @@ if parameter_true "$server_overridden"; then echo "$0: Overriding config server setting with $server" create_override_config_file $server $config_file -else - export source_config_file=$config_file fi alert_keyword=`get_config_param alert_keyword` Index: openacs-4/etc/install/install.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/install.sh,v diff -u -r1.12 -r1.13 --- openacs-4/etc/install/install.sh 8 Sep 2003 12:19:18 -0000 1.12 +++ openacs-4/etc/install/install.sh 10 Sep 2003 09:57:12 -0000 1.13 @@ -65,11 +65,10 @@ # Create a config file with overridden server name if it was # provided on the command line +export orig_config_file=$config_file if parameter_true "$server_overridden"; then echo "$0: Overriding config server setting with $server" create_override_config_file $server $config_file -else - export source_config_file=$config_file fi usage="$0 [OPTIONS] @@ -147,6 +146,7 @@ serverroot=`get_config_param serverroot` use_daemontools=`get_config_param use_daemontools` +svc_bindir=`get_config_param svc_bindir` svscanroot=`get_config_param svscanroot` svscan_sourcedir=`get_config_param svscan_sourcedir` server_url=`get_config_param server_url` @@ -179,7 +179,7 @@ fi # Log some important parameters for the installation -echo "$0: Starting installation with config_file $config_file. Using serverroot=$serverroot, server_url=$server_url, do_checkout=$do_checkout, do_install=${do_install}, dotlrn=$dotlrn, and database=$database., use_daemontools=$use_daemontools" +echo "$0: Starting installation with config_file $orig_config_file. Using serverroot=$serverroot, server_url=$server_url, do_checkout=$do_checkout, do_install=${do_install}, dotlrn=$dotlrn, and database=$database., use_daemontools=$use_daemontools" if parameter_true $use_daemontools; then echo "$0: Daemontools settings: svscanroot=$svscanroot svscan_sourcedir=$svscan_sourcedir" @@ -192,7 +192,7 @@ echo "$0: Taking down $serverroot at $(date)" if parameter_true $use_daemontools; then - svc -d ${svscanroot} + $svc_bindir/svc -d ${svscanroot} else # non-daemontools stop $stop_server_command @@ -218,7 +218,7 @@ #Oracle # Need to su to login shell for sqlplus to be in path. Should maybe make ORA_HOME # a config param instead. - su - oracle -c "cd $script_path; config_file=$source_config_file ./oracle/recreate-user.sh"; + su - oracle -c "cd ${script_path}/oracle; config_file=$config_file ./recreate-user.sh"; fi # Check out new files @@ -241,11 +241,11 @@ fi rm ${svscanroot} fi - svc -xd $svscan_sourcedir + $svc_bindir/svc -xd $svscan_sourcedir fi echo "$0: Checking out OpenACS at $(date)" - config_file=$source_config_file dotlrn=$dotlrn ./checkout.sh + config_file=$config_file dotlrn=$dotlrn ./checkout.sh # The post_checkout script can copy back any files (AOLServer config files, # log files etc.) under the new source tree, and apply any patches @@ -278,7 +278,7 @@ if [ -f $svscanroot/down ]; then rm $svscanroot/down fi - svc -u $svscanroot + $svc_bindir/svc -u $svscanroot else # non-daemontools command $start_server_command @@ -299,13 +299,13 @@ # Install OpenACS echo "$0: Starting installation of OpenACS at $(date)" - ${tclwebtest_dir}/tclwebtest -config_file $source_config_file openacs-install.test + ${tclwebtest_dir}/tclwebtest -config_file $config_file openacs-install.test # Restart the server echo "$0: Restarting server at $(date)" if parameter_true $use_daemontools; then - svc -t $svscanroot + $svc_bindir/svc -t $svscanroot else $restart_server_command fi @@ -321,17 +321,17 @@ if parameter_true "$dotlrn_demo_data"; then # Do .LRN demo data setup echo "$0: Starting basic setup of .LRN at $(date)" - ${tclwebtest_dir}/tclwebtest -config_file $source_config_file dotlrn-basic-setup.test + ${tclwebtest_dir}/tclwebtest -config_file $config_file dotlrn-basic-setup.test fi if parameter_true $crawl_links; then # Search for broken pages echo "$0: Starting to crawl links to search for broken pages at $(date)" - ${tclwebtest_dir}/tclwebtest -config_file $source_config_file dotlrn-links-check.test + ${tclwebtest_dir}/tclwebtest -config_file $config_file dotlrn-links-check.test fi # Run the Tcl API tests - ${tclwebtest_dir}/tclwebtest -config_file $source_config_file tcl-api-test.test + ${tclwebtest_dir}/tclwebtest -config_file $config_file tcl-api-test.test if [ $database == "postgres" ]; then # Run vacuum analyze Index: openacs-4/etc/install/oracle/recreate-user.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/oracle/recreate-user.sh,v diff -u -r1.1 -r1.2 --- openacs-4/etc/install/oracle/recreate-user.sh 5 Sep 2003 14:08:54 -0000 1.1 +++ openacs-4/etc/install/oracle/recreate-user.sh 10 Sep 2003 09:56:50 -0000 1.2 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Assumes the envirionment variable config_file to be set # The drop and create scripts are assumed to be in the same directory as this script