[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5e4d60cacabafccb0c1c11ccb4565f8d5251df7e

Evergreen Git git at git.evergreen-ils.org
Fri Mar 14 16:23:40 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  5e4d60cacabafccb0c1c11ccb4565f8d5251df7e (commit)
      from  10e245f7f8170990977cc8de48d1955719c440ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5e4d60cacabafccb0c1c11ccb4565f8d5251df7e
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Fri Feb 28 10:06:40 2014 -0800

    LP#1286248: remove references to osrf_ctl.sh
    
    This patch replaces references to osrf_ctl.sh, which is deprecated
    as of OpenSRF 2.3.0, with opensrf_control.  It also names
    2.3.0 as the minimum required version of OpenSRF.
    
    brick_ctl.sh gets the most changes as a consequence.  In particular:
    
    * the stop_{c,perl}/[re]start_{c,perl} actions are removed, as
      osrf_control behaves exactly the same when stopping or starting
      services.
    * the -s option for working with a single service is now documented,
      and is restricted to the stop_osrf/[re]start_osrf actions
    
    It should be noted that for brick-based setups (and other kinds of
    multi-server setups) better control can be had by using opensrf_control
    directly.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example
index d2cb911..8c021f3 100644
--- a/Open-ILS/examples/opensrf.xml.example
+++ b/Open-ILS/examples/opensrf.xml.example
@@ -1171,7 +1171,7 @@ vim:et:ts=4:sw=4:
             On Linux, the output of the following command is authoritative:
             $ perl -MNet::Domain -e 'print Net::Domain::hostfqdn() . "\n";'
 
-            To use 'localhost' instead, run osrf_ctl.sh with the -l flag
+            To use 'localhost' instead, run osrf_control with the --localhost flag
             -->
 
             <activeapps>
diff --git a/Open-ILS/src/support-scripts/brick_ctl.sh b/Open-ILS/src/support-scripts/brick_ctl.sh
index b456ef9..61a3a7e 100755
--- a/Open-ILS/src/support-scripts/brick_ctl.sh
+++ b/Open-ILS/src/support-scripts/brick_ctl.sh
@@ -42,18 +42,13 @@ function usage {
     echo "  -f <build_file> : the name of the bundle to fetch";
     echo "  -x <xul_dir> : staff client build directory";
     echo "  -i <xul_build_id> : staff client build ID";
+    echo "  -s <service_name> : apply action only to specified service";
     echo "Actions:";    
     echo "  fetch";
-    echo "  start_perl";
-    echo "  start_c";
     echo "  start_osrf";
     echo "  start_all";
-    echo "  stop_perl";
-    echo "  stop_c";
     echo "  stop_osrf";
     echo "  stop_all";
-    echo "  restart_perl";
-    echo "  restart_c";
     echo "  restart_osrf";
     echo "  restart_all";
     echo "  build";
@@ -94,14 +89,14 @@ else
     fi;
 fi;
 
-[ -n "$OPT_LOCALHOST" ] && PERL_LOCALHOST_FLAG="--localhost";
+[ -n "$OPT_LOCALHOST" ] && SERVICE_LOCALHOST_FLAG="--localhost";
 
 # make sure an action was specified
 [ -z "$OPT_ACTION" ] && usage;
 
-LOCAL_BASE="osrf_ctl.sh $OPT_LOCALHOST -d $OSRF_PID_DIR -c $OSRF_CONFIG";
-DRONE_BASE=". /etc/profile && osrf_ctl.sh -d $OSRF_PID_DIR -c $OSRF_CONFIG";
-PERL_CONTROLLER="opensrf-perl.pl --verbose $PERL_LOCALHOST_FLAG --config $OSRF_CONFIG --pid-dir $OSRF_PID_DIR --action $OPT_ACTION --service $OPT_SERVICE";
+LOCAL_BASE="osrf_control $OPT_LOCALHOST --pid-dir $OSRF_PID_DIR --config $OSRF_CONFIG";
+DRONE_BASE=". /etc/profile && osrf_control --pid-dir $OSRF_PID_DIR --config $OSRF_CONFIG";
+SERVICE_CONTROLLER="osrf_control $SERVICE_LOCALHOST_FLAG --config $OSRF_CONFIG --pid-dir $OSRF_PID_DIR --service $OPT_SERVICE";
 
 # -------------------------------------------------------------------
 # Runs DRONE_ACT on the drones, then LOCAL_ACT on the local machine
@@ -194,33 +189,34 @@ function fetch_build {
 # When other active languages are added, this script will need a language param
 # to determine which controller script to call.
 if [ -n "$OPT_SERVICE" ]; then
-    local_first "$PERL_CONTROLLER" "$PERL_CONTROLLER";
+    case $OPT_ACTION in
+        "start_osrf") local_first "$SERVICE_CONTROLLER --start" \
+            "$SERVICE_CONTROLLER --start";;
+        "stop_osrf") local_first "$SERVICE_CONTROLLER --stop" \
+            "$SERVICE_CONTROLLER --stop";;
+        "restart_osrf") local_first "$SERVICE_CONTROLLER --restart" \
+            "$SERVICE_CONTROLLER --restart";;
+        *) echo "Can only do start_osrf, stop_osrf, or restart_osrf for an individual service";;
+    esac;
     exit;
 fi;
 
 case $OPT_ACTION in
 
-    "start_osrf") local_first "$LOCAL_BASE -a start_perl && $LOCAL_BASE -a start_c" \
-        "$DRONE_BASE -a start_perl && $DRONE_BASE -a start_c";;
-
-    "stop_osrf") drone_first "$LOCAL_BASE -a stop_perl && $LOCAL_BASE -a stop_c" \
-        "$DRONE_BASE -a stop_perl && $DRONE_BASE -a stop_c";;
+    "start_osrf") local_first "$LOCAL_BASE --start-services" \
+        "$DRONE_BASE --start-services";;
 
-    "restart_osrf") local_first "$LOCAL_BASE -a restart_perl && $LOCAL_BASE -a restart_c" \
-        "$DRONE_BASE -a restart_perl && $DRONE_BASE -a restart_c";;
+    "stop_osrf") drone_first "$LOCAL_BASE --stop-services" \
+        "$DRONE_BASE --stop-services";;
 
-    "start_perl") local_first "$LOCAL_BASE -a start_perl" "$DRONE_BASE -a start_perl";;
-    "stop_perl") drone_first "$LOCAL_BASE -a stop_perl" "$DRONE_BASE -a stop_perl";;
-    "restart_perl") local_first "$LOCAL_BASE -a restart_perl" "$DRONE_BASE -a restart_perl";;
-    "start_c") local_first "$LOCAL_BASE -a start_c" "$DRONE_BASE -a start_c";;
-    "stop_c") drone_first "$LOCAL_BASE -a stop_c" "$DRONE_BASE -a stop_c";;
-    "restart_c") local_first "$LOCAL_BASE -a restart_c" "$DRONE_BASE -a restart_c";;
+    "restart_osrf") local_first "$LOCAL_BASE --restart-services" \
+        "$DRONE_BASE --restart-services";;
 
-    "start_all") local_first "$LOCAL_BASE -a start_all" \
-        "$DRONE_BASE -a start_perl && $DRONE_BASE -a start_c";;
+    "start_all") local_first "$LOCAL_BASE --start-all" \
+        "$DRONE_BASE --start-services";;
 
-    "stop_all") drone_first "$LOCAL_BASE -a stop_all" \
-        "$DRONE_BASE -a stop_perl && $DRONE_BASE -a stop_c";;
+    "stop_all") drone_first "$LOCAL_BASE --stop-all" \
+        "$DRONE_BASE --stop-services";;
 
     "restart_all") $0 $OPT_LOCALHOST -a stop_all; $0 $OPT_LOCALHOST -a start_all;;
     "build") cd ~/ILS/ && make clean default_config all;;
diff --git a/build/tools/update.sh b/build/tools/update.sh
index 75f1f65..5c72850 100755
--- a/build/tools/update.sh
+++ b/build/tools/update.sh
@@ -130,7 +130,7 @@ else
 fi
 
 sudo /etc/init.d/apache2 stop;
-$INSTALL/bin/osrf_ctl.sh -l -a stop_all;
+$INSTALL/bin/osrf_control --localhost --stop-all;
 
 # OpenSRF perl directory is not shared.  update the drone
 # ssh 10.5.0.202 "./update_osrf_perl.sh";
@@ -195,7 +195,7 @@ ln -s current/server server;
     
 
 sudo chown -R opensrf:opensrf $OSRF $ILS
-$INSTALL/bin/osrf_ctl.sh -l -a start_all
+$INSTALL/bin/osrf_control --localhost --start-all
 sleep 2;
 cd $INSTALL/bin; ./autogen.sh ../conf/opensrf_core.xml;
 sudo /etc/init.d/apache2 start;
diff --git a/docs/installation/server_upgrade.txt b/docs/installation/server_upgrade.txt
index 0dd7888..c7c99dc 100644
--- a/docs/installation/server_upgrade.txt
+++ b/docs/installation/server_upgrade.txt
@@ -36,7 +36,7 @@ as catalogue skins.
 +
 [source, bash]
 -----------------------------
-osrf_ctl.sh -l -a stop_all
+osrf_control --localhost --stop-all
 -----------------------------
 +
  .. Back up the /openils directory.
@@ -197,7 +197,7 @@ Restart Evergreen and Test
 +
 [source, bash]
 --------------------------------------------------------------
-osrf_ctl.sh -l -a start_all
+osrf_control --localhost --start-all
 --------------------------------------------------------------
 +
 . As the opensrf user, run autogen to refresh the static organizational data files:
diff --git a/docs/reports/reporter_add_data_source.txt b/docs/reports/reporter_add_data_source.txt
index df97c45..6cdb3ec 100644
--- a/docs/reports/reporter_add_data_source.txt
+++ b/docs/reports/reporter_add_data_source.txt
@@ -238,16 +238,10 @@ the fieldmapper definitions.
 /openils/bin/autogen.sh
 -------------
 +    
-. As the *opensrf* user, restart Perl services:
+. As the *opensrf* user, restart services:
 +
 -------------
-osrf_ctl.sh -l -a restart_perl
--------------
-+    
-. As the *opensrf* user, restart C services:
-+
--------------
-osrf_ctl.sh -l -a restart_c
+osrf_control --localhost --restart-services
 -------------
 +
 . As the *root* user, restart the Apache web server:

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/opensrf.xml.example     |    2 +-
 Open-ILS/src/support-scripts/brick_ctl.sh |   52 +++++++++++++---------------
 build/tools/update.sh                     |    4 +-
 docs/installation/server_upgrade.txt      |    4 +-
 docs/reports/reporter_add_data_source.txt |   10 +----
 5 files changed, 31 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list