From owner-freebsd-questions Mon Jan 7 19:50:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from web12004.mail.yahoo.com (web12004.mail.yahoo.com [216.136.172.212]) by hub.freebsd.org (Postfix) with SMTP id CB59A37B400 for ; Mon, 7 Jan 2002 19:49:44 -0800 (PST) Message-ID: <20020108034944.37073.qmail@web12004.mail.yahoo.com> Received: from [144.137.148.172] by web12004.mail.yahoo.com via HTTP; Tue, 08 Jan 2002 14:49:44 EST Date: Tue, 8 Jan 2002 14:49:44 +1100 (EST) From: =?iso-8859-1?q?Keith=20Spencer?= Subject: Anyone able to help me get it working? To: freebsd-questions@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-732918228-1010461784=:36046" Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --0-732918228-1010461784=:36046 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline Hi all, I am (bravely) trying to get ChiliASP to install on a FBSD4.4 box. It is meant for Linux but maybe it'll run under emulation...apparently if it doesn't use /proc too much it might run.(whatever the hell that is!) You can maybe tell I am a real genius at hacking. ;^) BACKGROUND: Anyways...ChiliASP is an ASP support module for Apache. It is really nice! It is good for ex-M$ dills like me who know VB but are clueless for Perl etc. I dev on a win* machine and load the applications to the freebsd server (hopefully) and voila...a fake windows machine that is more secure and works way better than windoze. HERE is my current dilemma: I have tried to run the install script only for it to immediately crap out saying... Display: not found Display: not found Display: not found etc.... Here are a couple of the install scripts...any clues? Thanks Keith http://my.yahoo.com.au - My Yahoo! - It's My Yahoo! Get your own! --0-732918228-1010461784=:36046 Content-Type: text/plain; name="install.sh" Content-Description: install.sh Content-Disposition: inline; filename="install.sh" #!/bin/bash ############################################################################## ## MAIN PROGRAM ## # make relative path non-relative if echo $0 | grep -v '^/' > /dev/null 2>&1; then PROGRAM_DIR=`pwd` fi PROGRAM_DIR="$PROGRAM_DIR/`echo $0 | sed 's,/[^/]*$,,'`" PACKAGE_DIR="$PROGRAM_DIR/package" . $PACKAGE_DIR/main-install.inc.sh --0-732918228-1010461784=:36046 Content-Type: text/plain; name="custom-install.inc.sh" Content-Description: custom-install.inc.sh Content-Disposition: inline; filename="custom-install.inc.sh" # This file is not executable file, but needs to work with either bash or ksh # on all platforms. if [ -z "$PROGRAM_DIR" ]; then echo "PROGRAM_DIR is not defined (custom-install.sh)." exit 1 fi if [ -z "$PACKAGE_DIR" ]; then echo "PACKAGE_DIR is not defined (custom-install.sh)." exit 1 fi if [ -z "$OS" ]; then echo "OS not defined (custom-install.sh)." exit 1 fi current_version="3.6.0" #`echo $OS | $tr '[a-z]' '[A-Z]' | $cut -b 1` beta_version=$current_version kfree_required=130000 # Ignore signals initially. trap ":" 1 2 15 function signal_handler { trap ":" 1 2 15 display display display "Error: Signal caught ..." cleanup } function tmp_cleanup { rm -f /tmp/export_data-$$ /tmp/migration.log-$$ 2> /dev/null } function cleanup { tmp_cleanup if kill -0 $CHILD_PID > /dev/null 2>&1; then kill -STOP $CHILD_PID fi # we have some error in the previous code. # clean up the location. cd / display display "Error: Setup program is unable to complete Chili!Soft ASP Installation!" display display -n "Please wait while setup removes this incomplete installation ... " if [ -f $asphome/INSTALL/settings.import ]; then # Save the export file. $mv -f $asphome/INSTALL/settings.import /tmp/settings.import.$$ $mv -f $asphome/logs/migration-export.log /tmp/migration-export.log.$$ fi ($asphome/uninstall force=yes; rm -rf "$asphome") > /dev/null 2>&1 & spin_wait $! if [ -f /tmp/settings.import.$$ ]; then # Restore the export file. $mkdir -p $asphome/INSTALL $mkdir -p $asphome/logs $mv /tmp/settings.import.$$ $asphome/INSTALL/settings.import $mv /tmp/migration-export.log.$$ $asphome/logs/migration-export.log fi display "" display "Thanks for Choosing Chili!Soft ASP" display "" exit 1 } ## MAIN PROGRAM ## # Establish a license key if one exists in the distribution. if [ -f "$PROGRAM_DIR/LICENSE.KEY" ]; then license_key="license_key=\"`cat $PROGRAM_DIR/LICENSE.KEY | tr -d '\n'`\"" fi # we require GNU tools like gunzip. if [ -x "$PACKAGE_DIR/tools/$OS/gunzip" ]; then gunzip="$PACKAGE_DIR/tools/$OS/gunzip" elif [ -n "`optional_locate_binary gunzip`" ]; then gunzip=`locate_binary gunzip` else display display "Error: Setup could not find GNU unzip on your machine (gunzip). GNU unzip" display " must exist for setup to extract the compressed files." display display "Note: Make sure the gunzip is installed and is in your path." display exit 1 fi clear display "" display " -----------------------------------------------------------------------------" display "| Chili!Soft ASP Custom Installation |" display "|-----------------------------------------------------------------------------|" display "| |" display "| Setup will now install the files needed to run and configure Chili!Soft |" display "| ASP to the directory you specify. To accept the default, which appears |" display "| below in brackets [], press Enter. To specify a different directory, type |" display "| the pathname, and then press Enter. |" display "| |" display "| Note: Configuration options specific to this installation will be |" display "| contained in this directory. You might want to make a note of its location |" display "| so that you can easily find the Chili!Soft ASP files at a later time. |" display "| |" display " -----------------------------------------------------------------------------" display "" display -n "Enter the directory in which to install Chili!Soft ASP [/opt/casp]: " read -r asphome if [ "$asphome" = "" ]; then asphome="/opt/casp" else asphome=`echo $asphome | $sed 's,//*$,,'`; if [ "$asphome" = "" ]; then asphome="/"; fi fi ## Custom code to detect Solaris 3.0.04 ## ## This product didn't have a caspi2.pl in the INSTALL directory, or an ## uninstall script for that matter. sowe will put them there now if ## we detect that it is a 3.0.04 build. the release does have a caspi2.pl ## in the root and an mwsetup.sh file, so lets check for those. ## if [ -f $asphome/caspi2.pl ] && [ -f $asphome/mwsetup.sh ] && [ ! -x $asphome/uninstall ]; then mkdir -p $asphome/INSTALL echo "# dummy file created by 3.6 installer" > $asphome/INSTALL/caspi2.pl cat $PACKAGE_DIR/uninstall-3.0.04 | $sed "s,<>,$perl," | $sed "s,<>,$asphome," > $asphome/uninstall chmod 777 $asphome/uninstall fi if [ -f $asphome/INSTALL/caspi2.pl ]; then version=`$perl $PACKAGE_DIR/server-settings.pl mode=detect "asphome=$asphome"` if [ "$?" = "0" ] && $perl $PACKAGE_DIR/server-settings.pl mode=export "asphome=$asphome" "export_file=/tmp/export_data-$$" "log_file=/tmp/migration.log-$$"; then export_settings=1 fi clear display "" display " -----------------------------------------------------------------------------" display "| Previous Installation Detected |" display "|-----------------------------------------------------------------------------|" display "| |" display "| Setup has found a previous installation at the location you specified, as |" display "| shown below. To uninstall the previous installation and continue, enter |" display "| y (yes). To cancel this installation and choose a different installation |" display "| path, enter n (no). |" if [ "$export_settings" = "1" ]; then display \ "| |" display \ "| Note: Setup has successfully exported your settings from the previous |" display \ "| installation. If you continue, Setup will uninstall the previous |" display \ "| installation. Later it will prompt you to import your settings into |" display \ "| the new installation. Before you can run the ASP Server, you will |" display \ "| need to take additional steps, as described in the README file. |" else display \ "| |" display \ "| IMPORTANT NOTE: |" display \ "| If you continue, all settings for your current Chili!Soft ASP |" display \ "| installation will be lost. The Upgrader supplied with this Installer |" display \ "| does not support upgrading settings from your current installation of |" display \ "| Chili!Soft ASP. If you need to preserve your existing settings, |" display \ "| download and install a new Upgrader from the Chili!Soft Web site at |" display \ "| http://www.chilisoft.com/support prior to continuing. |" fi display "| |" display " -----------------------------------------------------------------------------" display "" display "Previous version of Chili!Soft ASP: $version" display "New version of Chili!Soft ASP: $current_version" display "" query_user "Would you like setup to uninstall the previous version" "terminal_mark=?" "y" "default=n" uninstall=$query_result if [ "$uninstall" != "y" -a "$uninstall" != "yes" ]; then display display "Error: Setup cannot continue." display " Please run `$basename $0` again and choose a different location." display " " display -n "Press Enter to exit ..." read -r dummy tmp_cleanup exit 1 else display if [ -x $asphome/uninstall ]; then display display "Note: By uninstalling the previous installation, all files contained" display " under that installation's root directory will be removed. The" display " currently selected installation directory is:" display " $asphome" display else display display "Note: Setup has detected an incomplete installation that cannot be" display " successfully uninstalled. If you choose to continue, any file" display " contained under that installation directory will be destroyed." display " The current installation directory is:" display " $asphome" display fi query_user "Are you certain you wish to proceed" "terminal_mark=?" "y" "default=n" uninstall=$query_result if [ "$uninstall" != "y" -a "$uninstall" != "yes" ]; then display display "Error: Setup cannot continue." display " Please run `$basename $0` again and choose a different location." display display -n "Press Enter to exit..." read -r dummy tmp_cleanup exit 1 fi CURDIR=`pwd` if [ -f "$asphome/uninstall" ]; then cd $asphome/.. display "" display -n "Uninstalling previous installation ... " if echo $version | grep '^3.[5-9]' > /dev/null 2>&1; then $asphome/uninstall force=yes & else $asphome/uninstall force & fi else display "" display -n "Deleting previous installation ..." cd $asphome/.. $perl $PACKAGE_DIR/delete-server.pl (sleep 1; rm -rf "$asphome") & fi spin_wait $! display "" if [ $? = 0 ]; then clear display display "The previous Chili!Soft ASP installation has been removed." display "You may now proceed with the rest of the installation." display display -n "Press Enter to continue ..." read -r dummy else clear display display "The previous Chili!Soft ASP installation was not removed." display "Until this installation has been uninstalled, setup will be unable" display "to continue." display tmp_cleanup exit fi cd $CURDIR fi elif [ -d "$asphome" ] && [ ! -f "$asphome/INSTALL/settings.import" ]; then clear display "" display "Error: The installation directory already exists:" display " $asphome" display "" display "Note: To remove the possiblity that a user file would be corrupted," display " overwritten, or deleted, Chili!Soft ASP may not be installed in" display " a directory which already exists." display "" display "Please run `$basename $0` again and choose a different location." display "" tmp_cleanup exit 1 fi # find path if echo $0 | grep -v '^/' > /dev/null 2>&1; then custom_path=`pwd` fi custom_path="$custom_path/`echo $0 | sed 's,/[^/]*$,,'`" $mkdir -p $asphome/INSTALL $mkdir -p $asphome/logs if [ "$export_settings" = "1" ]; then $mv /tmp/export_data-$$ $asphome/INSTALL/settings.import $mv /tmp/migration.log-$$ $asphome/logs/migration-export.log $cp $PACKAGE_DIR/server-settings.pl $asphome/INSTALL $cp $PACKAGE_DIR/CaspMig $asphome/INSTALL $cp $PACKAGE_DIR/Migration-Rules.xml $asphome/INSTALL cat > $asphome/INSTALL/server-settings <> $asphome/logs/tar_log 2>&1 & CHILD_PID=$! dot_wait $CHILD_PID display " done." done display "" # chown / chgrp of all files in asphome to proper user (root/root). chown -R 0 "$asphome" chgrp -R 0 "$asphome" cd $asphome case $OS in AIX|aix ) $perl -I$asphome INSTALL/caspi2.pl "asphome=$asphome" "os=$OS" "com_layer=mainwin" $license_key ;; SunOS|sun*|SUN* ) $perl -I$asphome INSTALL/caspi2.pl "asphome=$asphome" "os=$OS" "com_layer=mainwin" $license_key ;; HP-UX|ux*|hp*|HP* ) $perl -I$asphome INSTALL/caspi2.pl "asphome=$asphome" "os=$OS" "com_layer=mainwin" $license_key ;; Linux|linux ) $perl -I$asphome INSTALL/caspi2.pl "asphome=$asphome" "override_install=true" "com_layer=mainwin" $license_key ;; * ) display "$OS is an unsupported operating system (custom-install.sh)." exit ;; esac resultCode=$? cd $custom_path if [ ${resultCode} != 0 ]; then cleanup else if [ -f "$asphome/INSTALL/settings.import" ]; then display display "" query_user "Would you like to import your settings from the previous install" "terminal_mark=?" "y" "default=n" import=`echo $query_result | $tr '[A-Z]' '[a-z]'` if [ "$import" = "y" ]; then display "" if $perl $PACKAGE_DIR/server-settings.pl mode=import "asphome=$asphome" "import_file=$asphome/INSTALL/settings.import" "log_file=$asphome/logs/migration-import.log"; then display "Your settings have been successfully imported." else display "Error: Import unsuccessful." display " Refer to your Chili!Soft ASP documentation for manual server migration instructions." fi else display "" display "If you would later like to import these settings, refer to Chili!Soft ASP" display "documentation for manual server migration instructions." fi fi fi --0-732918228-1010461784=:36046 Content-Type: text/plain; name="main-install.inc.sh" Content-Description: main-install.inc.sh Content-Disposition: inline; filename="main-install.inc.sh" # This file is not executable file, but needs to work with either bash or ksh # on all platforms. if [ -z "$PROGRAM_DIR" ]; then echo "PROGRAM_DIR is not defined (main-install.sh)." exit 1 fi if [ -z "$PACKAGE_DIR" ]; then echo "PACKAGE_DIR is not defined (main-install.sh)." exit 1 fi db2client_version="db2_07_01" odbc_version="15" if [ -z "$CHILIASP_INSTALL" ]; then CHILIASP_INSTALL="interactive" fi export CHILIASP_INSTALL function usage { progname=`$basename $0` display "Usage: ${progname} [-c] [-d] [-h|-?] " display "-c = custom installation mode." display "-d = default (Bundle)installation mode." display "-h/? = help on using this script ". display display "If you decide to choose bundle installation mode,then setup" display "will install Chili!Soft ASP with pre-configured apache and " display "frontpage server extensions for you". display display "If you decide to choose custom installation mode, then setup" display "will install Chili!Soft ASP Server and allow you to choose the" display "webserver with which you wish to configure your Chili!Soft ASP" display "server." display exit 1 } function install_overview { clear if `tty > /dev/null` then more package/install-overview.hlp else cat package/install-overview.hlp fi display "" display -n "Press the 'Enter' key to continue: " read -r type } function Configure_DB2_linux { db2install_status=1 # make sure asphome is defined # if [ "x$asphome" = "x" ]; then echo "Chili!Soft ASP Installation location not specified." echo "DB2 setup cannot continue without this location". return 1 fi # now make sure we have all the log files in place. # db2log="$asphome/logs/db2install_log" if [ ! -f "$db2log" ]; then $touch "$db2log" fi echo "" >> $db2log echo "DB2 client installation: `date`" >> $db2log # Check if we have our db2 package files # if [ -f "$PACKAGE_DIR/db2-client/db2cliv71-7.1.0-0.i386.rpm" ] && [ -f "$PACKAGE_DIR/db2-client/db2_deinstall" ]; then echo "DB2 install files were found at $PACKAGE_DIR/db2-client" >> $db2log else echo "DB2 client install files were not found at $PACKAGE_DIR/db2-client" >> $db2log echo "Skipping DB2 client installation" >> $db2log return 0 fi # db2 for linux only works for distributions that have # rpm installed # rpm_binary=`locate_binary rpm` if [ -n "$rpm_binary" ]; then # lets see if db2 has already been installed $rpm_binary -q db2cliv71 > /dev/null 2>&1 if [ "$?" = "0" ]; then # create odbc symlink for '/usr/IBMdb2/V7.1/lib/libdb2.so.1' #`$ln -sf /usr/IBMdb2/V7.1/lib/libdb2.so.1 $asphome/odbc/direct/lib/YYdb2${odbc_version}.so` #echo "DB2 was already installed on this machine" >> $db2log #echo "A symlink was created..." >> $db2log #echo "$asphome/odbc/direct/lib/YYdb2${odbc_version}.so ==> /usr/IBMdb2/V7.1/lib/libdb2.so.1" >> $db2log return 0 fi else clear echo "" echo " -----------------------------------------------------------------------------" echo "| |" echo "| Setup could not find RPM (RedHat Package Manager) needed to install the |" echo "| IBM DB2 runtime client. The IBM DB2 client is not supported on this |" echo "| machine. See Chili!Soft Documentation for details and possible solutions. |" echo "| |" echo " -----------------------------------------------------------------------------" echo "" echo "RPM (RedHat Package Manager) was not found on this machine." >> $db2log echo "Aborting DB2 installation" >> $db2log echo "" echo "" display -n "Press a key to continue. " read -r type return 1 fi # start the DB2 installation. clear echo "" echo " -----------------------------------------------------------------------------" echo "| |" echo "| Setup will now install the files needed to run and configure IBM DB2 |" echo "| Universal Database. |" echo "| |" echo " -----------------------------------------------------------------------------" echo "" echo "Running RPM..." $rpm_binary -i "$PACKAGE_DIR/db2-client/db2cliv71-7.1.0-0.i386.rpm" >> $db2log 2>&1 if [ "$?" = "0" ]; then display "DB2 client package was installed successfully." display "DB2 client package was installed successfully." >> $db2log cp "$PACKAGE_DIR/db2-client/db2_deinstall" "/usr/IBMdb2/V7.1" display "" display "To configure the DB2 client, run " display " #> /usr/IBMdb2/V7.1/install/db2setup" display "" display "To configure the DB2 client, run " >> $db2log display " #> /usr/IBMdb2/V7.1/install/db2setup" >> $db2log display "" >> $db2log display "See '$db2log' for details" # create odbc symlink for '/usr/IBMdb2/V7.1/lib/libdb2.so.1' #`$ln -sf /usr/IBMdb2/V7.1/lib/libdb2.so.1 $asphome/odbc/direct/lib/YYdb2${odbc_version}.so` #display "A symlink was created..." >> $db2log #display "$asphome/odbc/direct/lib/YYdb2${odbc_version}.so ==> /usr/IBMdb2/V7.1/lib/libdb2.so.1" >> $db2log display "" display "" display -n "Press a key to continue. " read -r type return 0 else display "The DB2 client package failed to install." display "The DB2 client package failed to install." >> $db2log display "See '$db2log' for details" fi display "" display "" display -n "Press a key to continue. " read -r type return 1 } function Configure_DB2_aix { db2install_status=1 if [ "x$asphome" = "x" ]; then echo "Chili!Soft ASP Installation location not specified." echo "DB2 setup cannot continue without this location". return 1 fi if [ "x$startpath" = "x" ]; then startpath=`pwd` fi `/usr/bin/lslpp -lcaq ${db2client_version}.client > /dev/null 2>&1` status="$?" if [ "${status}" -eq "0" ]; then db2_install=1 if [ -f "/usr/lpp/${db2client_version}/lib/db2.o" ]; then `$ln -sf /usr/lpp/${db2client_version}/lib/db2.o $asphome/odbc/direct/lib/YYdb2${odbc_version}.so` else `$ln -sf $asphome/odbc/direct/lib/YYudb${odbc_version}.so $asphome/odbc/direct/lib/YYdb2${odbc_version}.so` fi else db2_install=0 `$ln -sf $asphome/odbc/direct/lib/YYudb${odbc_version}.so $asphome/odbc/direct/lib/YYdb2${odbc_version}.so` fi if [ -f "$startpath/package/RTClient/db2setup" ] && [ -f "$startpath/package/RTClient/db2rtcl.rsp" ]; then if [ "$db2_install" -eq "1" ]; then echo "Setup has detected that you have already installed DB2(${db2client_version}) runtime client" | $tee -a $asphome/logs/db2install_log echo "Skipping DB2 Client setup." >> $asphome/logs/db2install_log 2>&1 echo "" cd $startpath return fi if [ "$install_mode" != "bundle" ] && [ "$db2_install" -eq "0" ]; then # First find out if the user wants to have this bundle installed. query_user "Do you want to install DB2(${db2client_version}) runtime client " "terminal_mark=?" "yes" "default=no" if [ "$query_result" != "yes" -a "$query_result" != "y" ]; then echo "\n Skipping DB2 Client configuration setup." echo "" cd $startpath return fi fi # now make sure we have all the log files in place. if [ ! -f "$asphome/logs/db2install_log" ]; then $touch -f "$asphome/logs/db2install_log" fi # start the DB2 installation. clear echo "" echo " -----------------------------------------------------------------------------" echo "| |" echo "| Setup will now install the files needed to run and configure IBM DB2 |" echo "| Universal Database. |" echo "| |" echo " -----------------------------------------------------------------------------" echo "" cd ${startpath}/package/RTClient echo "Installing DB2 Runtime client on your machine." display -n "This might take time, Please wait .. " `./db2setup -r ${startpath}/package/RTClient/db2rtcl.rsp >> $asphome/logs/db2install_log 2>&1` & spin_wait $! echo "" # take a backup of this driver to use it with Chili!Soft ASP installation. if [ -f "/usr/lpp/${db2client_version}/lib/db2.o" ]; then `$ln -sf /usr/lpp/${db2client_version}/lib/db2.o $asphome/odbc/direct/lib/YYdb2${odbc_version}.so` fi # store the log messages. if [ -f "/tmp/db2setup.log" ]; then `$cp /tmp/db2setup.log $asphome/logs/db2setup_log` fi #verify the installation. `/usr/bin/lslpp -lcaq ${db2client_version}.client > /dev/null 2>&1` install_status="$?" if [ "${install_status}" -ne "0" ]; then echo "DB2 run time client installation failed." | $tee -a $asphome/logs/db2install_log echo "The error log file is found at $asphome/logs/db2setup_log" db2install_status=1 return $db2install_status fi # try to configure the DB2 run time client. clear echo " -----------------------------------------------------------------------------" echo "| |" echo "| Setup will now try to create a new DB2 instance for this run time client. |" echo "| To create a DB2 instance, setup needs to create a new user (cdb2inst) and |" echo "| and group (cdb2adm) in your machine. |" echo "| |" echo " -----------------------------------------------------------------------------" display -n "Creating group (cdb2adm) .. " | $tee -a $asphome/logs/db2install_log `mkgroup -a cdb2adm >> $asphome/logs/db2install_log 2>&1` group_result="$?" if [ "${group_result}" -ne "0" ]; then echo "Failed " | $tee -a $asphome/logs/db2install_log echo echo " -----------------------------------------------------------------------------" echo "| |" echo "| This setup program is unable to create a new instance in your machine. |" echo "| You will need to manually create a new user/group and then run the following|" echo "| command on your system, to create a new instance. |" echo "| |" echo "| Command to create a new instance: |" echo "| /usr/lpp/db2_07_01/instance/db2icrt -s client username |" echo "| |" echo " -----------------------------------------------------------------------------" echo cd $startpath db2install_status=1 return $db2install_status else echo "Success" | $tee -a $asphome/logs/db2install_log fi display -n "Creating user (cdb2inst) .. " | $tee -a $asphome/logs/db2install_log `mkuser -a pgrp='cdb2adm' home='/home/cdb2inst' login='false' rlogin='false' cdb2inst >> $asphome/logs/db2install_log 2>&1` user_result="$?" if [ "${user_result}" -ne "0" ]; then echo "Failed " | $tee -a $asphome/logs/db2install_log echo echo " -----------------------------------------------------------------------------" echo "| |" echo "| This setup program is unable to create a new instance in your machine. |" echo "| You will need to manually create a new user/group and then run the following|" echo "| command on your system, to create a new instance. |" echo "| |" echo "| Command to create a new instance: |" echo "| /usr/lpp/db2_07_01/instance/db2icrt -s client username |" echo "| |" echo " -----------------------------------------------------------------------------" echo cd $startpath db2install_status=1 return $db2install_status else echo "Success" | $tee -a $asphome/logs/db2install_log fi # Now it is time to do the finaly instance creation. if [ -x "/usr/lpp/${db2client_version}/instance/db2icrt" ]; then `/usr/lpp/${db2client_version}/instance/db2icrt -s client cdb2inst >> $asphome/logs/db2install_log 2>&1` instance_status="$?" if [ "${instance_status}" -ne "0" ]; then echo "Error:Unable to create an instance" | $tee -a $asphome/logs/db2install_log echo echo " -----------------------------------------------------------------------------" echo "| |" echo "| This setup program is unable to create a new instance in your machine. |" echo "| If you have already created an instance for this user name, then this |" echo "| setup program cannot create another instance with the same user name. |" echo "| |" echo "| Please refer to DB2 Installation manual for more information on this. |" echo "| Command to create a new instance: |" echo "| /usr/lpp/db2_07_01/instance/db2icrt -s client username |" echo "| |" echo " -----------------------------------------------------------------------------" echo echo "DB2 installation Failed." | $tee -a $asphome/logs/db2install.log db2install_status=1 return $db2install_status else echo "DB2 client installation completed successfully. " | $tee -a $asphome/logs/db2install_log fi else echo "Error:Unable to create an instance" | $tee -a $asphome/logs/db2install_log echo echo "|-----------------------------------------------------------------------------|" echo "| |" echo "| This setup program is unable to create a new instance in your machine. |" echo "| If you have already created an instance for this user name, then this |" echo "| setup program cannot create another instance with the same user name. |" echo "| |" echo "| Please refer to DB2 Installation manual for more information on this. |" echo "| Command to create a new instance: |" echo "| /usr/lpp/db2_07_01/instance/db2icrt -s client username |" echo "| |" echo "|-----------------------------------------------------------------------------|" echo echo "DB2 installation Failed." | $tee -a $asphome/logs/db2install.log db2install_status=1 return $db2install_status fi fi # everything went out fine. db2install_status=0 return $db2install_status } # DB2 client configuration start here. # find out if the user already has the DB2 driver at the destined location # if yes, then we will create a symlink at the odbc/lib location. # if not, the installer by default will create a symlink for Merant DB2 driver. # returns 1 on error and 0 on success. function Configure_DB2 { case $OS in AIX|aix ) Configure_DB2_aix ;; Linux|linux ) Configure_DB2_linux ;; * ) # don't do anything on these platforms ;; esac } ############################################################################## ## MAIN PROGRAM ## # Include common sh includes. . $PACKAGE_DIR/common.inc.sh # Process command-line options case $# in 0|1) while getopts :cdnh optchar; do case ${optchar?} in c) # custom Mode. install_mode="custom" ;; d) # Default Bundle Mode. install_mode="bundle" ;; n) # Completely non-interactive bundle mode. install_mode="bundle" CHILIASP_INSTALL="noninteractive" if [ ! -f "$PROGRAM_DIR/LICENSE.KEY" ]; then echo "Error: No $PROGRAM_DIR/LICENSE.KEY file exists." echo " Unable to continue the non-interactive install." exit 1 fi ;; h|?) # Display help usage ;; esac done ;; *) echo "Error: Invalid number of arguments." usage ;; esac ## Make sure that we have our file here. if [ -z "`ls $PACKAGE_DIR/casp-images/*.tar.gz`" ]; then echo "ERROR: Unable to locate the Chili!Soft ASP tar files." exit fi if [ -x "$PACKAGE_DIR/tools/$OS/gunzip" ]; then gunzip_binary="$PACKAGE_DIR/tools/$OS/gunzip" elif [ -n "`locate_binary gunzip`" ]; then gunzip_binary=`locate_binary gunzip` fi if [ ! -d /usr/local/bin ]; then mkdir=`locate_binary mkdir`; $mkdir -p /usr/local/bin fi if [ ! -x /usr/local/bin/gzip ]; then cp=`locate_binary cp`; $cp $gunzip_binary /usr/local/bin/gzip if [ ! -x /usr/local/bin/gunzip ]; then ln=`locate_binary ln`; $ln -sf gzip /usr/local/bin/gunzip fi fi if [ "x$gunzip_binary" = "x" ]; then echo echo "Setup could not find GNU unzip (gunzip) on your machine. GNU unzip" echo "must exist for setup to extract the compressed files." echo echo "Make sure the GNU unzip program is installed and is in your" echo "path." echo exit 1 fi # # make sure we have perl # perlbin=`optional_locate_binary perl`; if [ -z "$perlbin" ] && [ -x "/opt/perl/bin/perl" ]; then perlbin="/opt/perl/bin/perl" fi if [ "x$perlbin" = "x" ]; then echo echo "Setup could not find Perl on your machine. Perl must exist" echo "for setup to continue." echo echo "Make sure the perl program is installed and is in your path." echo exit 1 fi if [ "$CHILIASP_INSTALL" = "interactive" ]; then # EULA if `tty > /dev/null` then more $PACKAGE_DIR/EULA else cat $PACKAGE_DIR/EULA fi echo "" query_user "Do you agree to the terms" "terminal_mark=?" "yes" "default=no" if [ "$query_result" != "yes" -a "$query_result" != "y" ]; then echo "\nCannot continue without agreeing to EULA" exit fi fi # Now without user intervention, we will work to convert the ini file format # to match with the existing version. `$perlbin $PACKAGE_DIR/ini-upgrade.pl` while [ ${install_mode:-"not_set"} = "not_set" ];do clear display "" display " -----------------------------------------------------------------------------" display "| Welcome to Chili!Soft ASP Setup |" display "|-----------------------------------------------------------------------------|" display "| |" display "| To install the Chili!Soft ASP Server and Administration Console on |" display "| your computer follow the prompts provided by this setup program. For |" display "| more information on a step, choose the 'More Information' option. |" display "| IMPORTANT: The option you choose will have serious implications for |" display "| your server environment. It is highly recommended that you review |" display "| the product README file as well as 'More Information' before choosing |" display "| an option. |" display "| |" display "| Installation Step 1: Select an installation option: |" display "| |" display "| 1. Bundle: This option installs Chili!Soft ASP as well as a |" display "| preconfigured Apache 1.3.12 Web server and Microsoft |" display "| FrontPage 2000 Server Extensions. |" display "| |" display "| 2. Custom: This option installs only Chili!Soft ASP and enables |" display "| you to choose custom configuration settings. If you |" display "| select this option it is HIGHLY RECOMMENDED that you |" display "| print the product README file to use as a reference |" display "| during installation. |" display "| |" display "| 3. Exit: This option exits the setup program. |" display "| |" display "| 4. More Information |" display "| |" display " -----------------------------------------------------------------------------" display "" display -n "Choose an installation type (1/2/3/4): " read -r type case $type in 1) install_mode="bundle" ;; 2) install_mode="custom" ;; 3) exit 1 ;; 4) install_overview ;; *) display -n "Invalid Selection." ;; esac done startpath=`pwd` # let us source all these new installation scripts, based on # installation mode. # these scripts would die, if they failed the installation method. if [ "$install_mode" = "bundle" ]; then . $PACKAGE_DIR/bundle-install.inc.sh elif [ "$install_mode" = "custom" ]; then . $PACKAGE_DIR/custom-install.inc.sh else echo "Invalid installation mode selected. Setup will exit now" exit 1 fi # the installer will try to detect the DB2 configuration, and # update the symbol links for the DB2 appropriately. Configure_DB2 cd $startpath if [ "$CHILIASP_INSTALL" = "interactive" ]; then clear echo "" echo " -----------------------------------------------------------------------------" echo "| |" echo "| Chili!Soft ASP Installation Completed Successfully!. |" echo "| Thank you for choosing Chili!Soft ASP. |" echo "| |" echo " -----------------------------------------------------------------------------" echo "" if [ "$install_mode" = "bundle" ]; then echo " Installation summary log: '/usr/local/chilisoft/casp/logs/install_summary'" else echo " Installation summary log: '$asphome/logs/install_summary'" fi echo "" echo " NEXT STEPS : Please refer to README, Section 5: ' What to do after the" echo " Chili!Soft ASP Installation is Complete' for important information on" echo " what to do next." echo "" echo " REGISTER NOW : Please take a moment to register this product. By" echo " registering , you will be eligible for 30 days of free introductory support." echo " Register at http://www.chilisoft.com/register" echo "" fi # clean up invalid entries here. unset startpath custom_path bundle_path gunzip_binary perlbin exit 0 --0-732918228-1010461784=:36046-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message