From ba5047d7f5cef201f8815ed4309ca4127d175d09 Mon Sep 17 00:00:00 2001 From: dbs Date: Sun, 11 Oct 2009 03:43:19 +0000 Subject: [PATCH] Add a '-l' option to treat the hostname as 'localhost', to match osrf_ctl.sh. This will be useful in testing and tutorial scenarios. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1812 9efc2488-bf62-4759-914b-345cdb29e865 --- bin/opensrf-perl.pl.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/opensrf-perl.pl.in b/bin/opensrf-perl.pl.in index 3ca98b1..e650115 100755 --- a/bin/opensrf-perl.pl.in +++ b/bin/opensrf-perl.pl.in @@ -31,6 +31,7 @@ my $opt_config = "@sysconfdir@/opensrf_core.xml"; 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 @@ GetOptions( '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 @@ sub do_help { 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 -- 2.43.2