Use 'ps -C $HSMTOOL_BASE -o args=' rather than 'pgrep -fl
$HSMTOOL_BASE' to get the copytool command line.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idb1238966de1a8bea5d5c225632936d8c0a88529
Reviewed-on: http://review.whamcloud.com/20093
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
# Lustre mount-point is mandatory and last parameter on
# copytool cmd-line.
- local mntpnt=$(do_rpc_nodes $agent pgrep -fl $HSMTOOL_BASE |
- grep -v pgrep | awk '{print $NF}')
+ local mntpnt=$(do_rpc_nodes $agent ps -C $HSMTOOL_BASE -o args= |
+ awk '{print $NF}')
[ -n "$mntpnt" ] || error "Found no Agent or with no mount-point "\
"parameter"
do_rpc_nodes $agent get_client_uuid $mntpnt | cut -d' ' -f2