improving the devenv setup process, take 2

This commit is contained in:
fgerlits 2006-06-29 21:09:31 +00:00
parent 8734e53340
commit 12be6361e2
2 changed files with 28 additions and 4 deletions

View file

@ -103,6 +103,17 @@ echo "for user: $user.";
echo ""
#-------------------------------------------------------------------------------
# The details of installation
#-------------------------------------------------------------------------------
postgres_user=postgres
ls_database=LiveSupport-$user
ls_dbuser=test
ls_dbpassword=test
ls_dbserver=localhost
#-------------------------------------------------------------------------------
# Function to check for the existence of an executable on the PATH
#
@ -143,8 +154,6 @@ check_exe "odbcinst" || exit 1;
#-------------------------------------------------------------------------------
echo "Creating database and database user...";
postgres_user=postgres
# FIXME: the below might not work for remote databases
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
@ -171,6 +180,9 @@ odbcinst_template=$products_dir/scheduler/etc/odbcinst_template
odbc_template=$products_dir/scheduler/etc/odbc_template
odbc_template_tmp=/tmp/odbc_template.$$
replace_sed_string="s/ls_database/$ls_database/; \
s/ls_dbserver/$ls_dbserver/;"
# check for an existing PostgreSQL ODBC driver, and only install if necessary
odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"`
if [ "x$odbcinst_res" == "x" ]; then

View file

@ -103,6 +103,17 @@ echo "for user: $user.";
echo ""
#-------------------------------------------------------------------------------
# The details of installation
#-------------------------------------------------------------------------------
postgres_user=postgres
ls_database=LiveSupport-$user
ls_dbuser=test
ls_dbpassword=test
ls_dbserver=localhost
#-------------------------------------------------------------------------------
# Function to check for the existence of an executable on the PATH
#
@ -143,8 +154,6 @@ check_exe "odbcinst" || exit 1;
#-------------------------------------------------------------------------------
echo "Creating database and database user...";
postgres_user=postgres
# FIXME: the below might not work for remote databases
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
@ -171,6 +180,9 @@ odbcinst_template=$products_dir/scheduler/etc/odbcinst_debian_template
odbc_template=$products_dir/scheduler/etc/odbc_template
odbc_template_tmp=/tmp/odbc_template.$$
replace_sed_string="s/ls_database/$ls_database/; \
s/ls_dbserver/$ls_dbserver/;"
# check for an existing PostgreSQL ODBC driver, and only install if necessary
odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"`
if [ "x$odbcinst_res" == "x" ]; then