Here's the patch ... there's a couple changes in here that I haven't
tested, but they're cleanup stuff - nothing that should render it
inoperable.  I have my MySQL server on a different machine and simply
following the existing instructions allows this setup to work fine. 
Those instructions should be changed, however, to eliminate the sentence
that says the two servers should be on the same machine.  Since this
documentation is on the web and not part of CVS I can't post a patch ...

In my previous message I mentioned a potential problem with one of the
CGI scripts, but it looks to be fine.  I didn't look exhaustively,
though, so there may be problems yet, but they all look pretty
solid/consistent.

Also, I have no idea how to make a patch from CVS.  Hope it works.

Chris

--8<-- --8<-- --8<-- --8<-- --8<-- --8<-- --8<-- --8<-- --8<-- --8<--

Index: install-db.pl
===================================================================
RCS file: /src/repository/obs/install-db.pl,v
retrieving revision 1.13
diff -u -p -r1.13 install-db.pl
--- install-db.pl       2000/03/27 22:57:31     1.13
+++ install-db.pl       2001/01/23 19:50:15
@@ -176,6 +176,7 @@ sub CreateObsDefsModule
     }
     close(FILE);
 
+    $conf =~ s/\@OBSSERVER\@/$server/;
     $conf =~ s/\@OBSUSER\@/$user/;
     $conf =~ s/\@OBSPWD\@/$passwd/;
     $conf =~ s/\@OBSDB\@/$db/;
@@ -206,6 +207,10 @@ sub InstallPerlModules
 
 sub GetSetupInfo
 {
+    print "Host MySQL server is on [localhost]: ";
+    $server = <STDIN>;
+    chop($server);
+
     print "Obseqieum database to use [obs]: ";
     $db = <STDIN>;
     chop($db);
@@ -227,7 +232,7 @@ sub GetSetupInfo
     system("stty echo");
     print "\n";
 
-    $server = "localhost";
+    $server = "localhost" unless $server ne '';
     $db = "obs" unless $db ne '';
     $user = "obs" unless $user ne '';
 
Index: main/Main.cpp
===================================================================
RCS file: /src/repository/obs/main/Main.cpp,v
retrieving revision 1.18
diff -u -p -r1.18 Main.cpp
--- main/Main.cpp       2000/07/13 17:41:24     1.18
+++ main/Main.cpp       2001/01/23 19:50:15
@@ -55,7 +55,7 @@ const int      iMaxCommandLen = 1024;
 
 const char *szGetDBInfoPerl =
     "perl -e 'use Obs::Defs; "
-    "print Obs::Defs::OBS_HOST.\"\\n\"; "
+    "print Obs::Defs::DB_SERVER.\"\\n\"; "
     "print Obs::Defs::DB_DB.\"\\n\"; "
     "print Obs::Defs::DB_USER.\"\\n\"; "
     "print Obs::Defs::DB_PASSWD.\"\\n\";'";
Index: perl/Obs/Defs/Defs.pm.in
===================================================================
RCS file: /src/repository/obs/perl/Obs/Defs/Defs.pm.in,v
retrieving revision 1.1
diff -u -p -r1.1 Defs.pm.in
--- perl/Obs/Defs/Defs.pm.in    2000/03/20 06:23:47     1.1
+++ perl/Obs/Defs/Defs.pm.in    2001/01/23 19:50:16
@@ -14,11 +14,12 @@ use constant OBS_HOST    => "localhost";
 use constant OBS_PORT    => 4420;
 
 # Database definitions
+use constant DB_SERVER => '@OBSSERVER@';
 use constant DB_DB => '@OBSDB@';
 use constant DB_USER => '@OBSUSER@';
 use constant DB_PASSWD => '@OBSPWD@';
 use constant DB_PORT => 3306;
-use constant DSN => 'dbi:mysql:' . Obs::Defs::DB_DB;
+use constant DSN => 'dbi:mysql:' . Obs::Defs::DB_SERVER .':'.
Obs::Defs::DB_DB;
 
 # Obs home path
 use constant OBS_HOME => '@OBSHOME@';
@@ -36,7 +37,7 @@ sub IsAdmin
 
 sub GetDBInfo
 {
-   return (Obs::Defs::DB_DB, Obs::Defs::OBS_HOST, Obs::Defs::DB_PORT, 
+   return (Obs::Defs::DB_DB, Obs::Defs::DB_SERVER, Obs::Defs::DB_PORT, 
            Obs::Defs::DB_USER, Obs::Defs::DB_PASSWD);
 }
_______________________________________________
Obs-dev mailing list
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/obs-dev

Reply via email to