|
|
7100e8 |
commit b7e8996ed0ecf7dd46c0cc2adf630f8c3f1ce9a3
|
|
|
7100e8 |
Author: Andrew Beekhof <andrew@beekhof.net>
|
|
|
7100e8 |
Date: Mon Feb 24 14:17:48 2014 +1100
|
|
|
7100e8 |
|
|
|
7100e8 |
Feature: crm_report: Allow ssh alternatives to be used
|
|
|
7100e8 |
|
|
|
7100e8 |
(cherry picked from commit 334f4f7c2863424f2461c13880621fb1e7e26ebb)
|
|
|
7100e8 |
|
|
|
7100e8 |
diff --git a/tools/crm_report.in b/tools/crm_report.in
|
|
|
7100e8 |
index 3af1b3f..0607ebf 100755
|
|
|
7100e8 |
--- a/tools/crm_report.in
|
|
|
7100e8 |
+++ b/tools/crm_report.in
|
|
|
7100e8 |
@@ -20,12 +20,12 @@
|
|
|
7100e8 |
|
|
|
7100e8 |
# Note the quotes around `$TEMP': they are essential!
|
|
|
7100e8 |
TEMP=`getopt \
|
|
|
7100e8 |
- -o hv?xl:f:t:n:T:Lp:c:dSACHu:D:MVs \
|
|
|
7100e8 |
- --long help,cts:,cts-log:,dest:,node:,nodes:,from:,to:logfile:,as-directory,single-node,cluster:,user:,max-depth:,version,features \
|
|
|
7100e8 |
+ -o hv?xl:f:t:n:T:Lp:c:dSACHu:D:MVse: \
|
|
|
7100e8 |
+ --long help,cts:,cts-log:,dest:,node:,nodes:,from:,to:logfile:,as-directory,single-node,cluster:,user:,max-depth:,version,features,rsh: \
|
|
|
7100e8 |
-n 'crm_report' -- "$@"`
|
|
|
7100e8 |
eval set -- "$TEMP"
|
|
|
7100e8 |
|
|
|
7100e8 |
-
|
|
|
7100e8 |
+rsh="ssh -T"
|
|
|
7100e8 |
times=""
|
|
|
7100e8 |
tests=""
|
|
|
7100e8 |
nodes=""
|
|
|
7100e8 |
@@ -72,6 +72,7 @@ Options:
|
|
|
7100e8 |
-H, --heartbeat force the cluster type to be Heartbeat
|
|
|
7100e8 |
-u, --user user ssh username for cluster nodes (default: root)
|
|
|
7100e8 |
-D, --depth search depth to use when attempting to locate files
|
|
|
7100e8 |
+ -e, --rsh specify the remote shell to use (default: ssh -T)
|
|
|
7100e8 |
--dest a custom destination directory/file
|
|
|
7100e8 |
dest a custom destination directory/file
|
|
|
7100e8 |
|
|
|
7100e8 |
@@ -115,6 +116,7 @@ while true; do
|
|
|
7100e8 |
-C|--corosync) cluster="corosync"; shift;;
|
|
|
7100e8 |
-H|--heartbeat) cluster="heartbeat"; shift;;
|
|
|
7100e8 |
-c|--cluster) cluster="$2"; shift; shift;;
|
|
|
7100e8 |
+ -e|--rsh) rsh="$2"; shift; shift;;
|
|
|
7100e8 |
-u|--user) ssh_user="$2"; shift; shift;;
|
|
|
7100e8 |
-D|--max-depth) maxdepth="$2"; shift; shift;;
|
|
|
7100e8 |
-M) search_logs=0; shift;;
|
|
|
7100e8 |
@@ -184,7 +186,7 @@ EOF
|
|
|
7100e8 |
bash $l_base/collector
|
|
|
7100e8 |
else
|
|
|
7100e8 |
cat $l_base/.env $report_data/report.common $report_data/report.collector \
|
|
|
7100e8 |
- | ssh -l $ssh_user -T $node -- "mkdir -p $r_base; cat > $r_base/collector; bash $r_base/collector" | (cd $l_base && tar mxf -)
|
|
|
7100e8 |
+ | $rsh -l $ssh_user $node -- "mkdir -p $r_base; cat > $r_base/collector; bash $r_base/collector" | (cd $l_base && tar mxf -)
|
|
|
7100e8 |
fi
|
|
|
7100e8 |
done
|
|
|
7100e8 |
|