From d9ea2cc860918c5d0190ec499790d7abb428482e Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 12 Dec 2007 14:35:34 +0000 Subject: [PATCH] backporting offline config generation to prevent config clobbering git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_1@8204 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- config.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config.sh b/config.sh index b40845ce53..c96d8623c0 100755 --- a/config.sh +++ b/config.sh @@ -205,6 +205,32 @@ function writeConfig { _write '$main::config{index} = "config.cgi";'; + # -------------------------------------------------------------------- + # Now we'll write out the offline config + CONFIG_FILE='Open-ILS/src/offline/offline-config.pl'; + rm -f "$CONFIG_FILE"; + echo "Writing bootstrapping config to $CONFIG_FILE..."; + + _write "\$main::config{base_dir} = '$PREFIX/var/data/offline/';"; + _write "\$main::config{bootstrap} = '$ETCDIR/opensrf_core.xml';"; + + STR='$main::config{dsn} ='; + STR="$STR 'dbi:${DBDRVR}:host="; + STR="${STR}${DBHOST};dbname="; + STR="${STR}${DBNAME};port="; + STR="${STR}${DBPORT}';"; + _write "$STR" + + STR='$main::config{usr} ='; + STR="$STR '$DBUSER';"; + _write "$STR" + + STR='$main::config{pw} ='; + STR="$STR '$DBPW';"; + _write "$STR" + # -------------------------------------------------------------------- + + prompt ""; prompt ""; prompt "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; -- 2.11.0