[Opensrf-commits] r1812 - trunk/bin (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Oct 10 23:43:22 EDT 2009


Author: dbs
Date: 2009-10-10 23:43:19 -0400 (Sat, 10 Oct 2009)
New Revision: 1812

Modified:
   trunk/bin/opensrf-perl.pl.in
Log:
Add a '-l' option to treat the hostname as 'localhost', to match osrf_ctl.sh.

This will be useful in testing and tutorial scenarios.


Modified: trunk/bin/opensrf-perl.pl.in
===================================================================
--- trunk/bin/opensrf-perl.pl.in	2009-10-10 19:19:27 UTC (rev 1811)
+++ trunk/bin/opensrf-perl.pl.in	2009-10-11 03:43:19 UTC (rev 1812)
@@ -31,6 +31,7 @@
 my $opt_pid_dir = "@TMP@";
 my $opt_no_daemon = 0;
 my $opt_settings_pause = 0;
+my $opt_localhost = 0;
 my $opt_help = 0;
 my $verbose = 0;
 my $sclient;
@@ -44,10 +45,15 @@
     'pid-dir=s' => \$opt_pid_dir,
     'no-daemon' => \$opt_no_daemon,
     'settings-startup-pause=i' => \$opt_settings_pause,
+    'localhost' => \$opt_localhost,
     'help' => \$opt_help,
     'verbose' => \$verbose,
 );
 
+if ($opt_localhost) {
+    $hostname = 'localhost';
+    $ENV{OSRF_HOSTNAME} = $hostname;
+}
 
 sub haltme {
     kill('INT', -$$); #kill all in process group
@@ -231,6 +237,10 @@
         in batch mode (start_all).  The purpose is to give plenty of time for
         the settings server to be up and active before any non-Perl services
         attempt to connect.
+
+    --localhost
+        Force the hostname to be 'localhost', instead of the fully qualified
+        domain name for the machine.
         
     --help
         Print this help message



More information about the opensrf-commits mailing list