From 8d957f8b11602120a70285e5dc831cf3e0b7d0bd Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 23 Jun 2015 03:09:21 -0400 Subject: [PATCH] fix for bug 4693: rcons -v calls xCAT::Version->Version() --- xCAT-client/bin/rcons | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xCAT-client/bin/rcons b/xCAT-client/bin/rcons index ec599ea46..50dad3b9d 100755 --- a/xCAT-client/bin/rcons +++ b/xCAT-client/bin/rcons @@ -20,12 +20,11 @@ if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" echo "rcons [-h|--help|-v|--version]" exit 0 fi -if [ "$1" = "-v" ]; then - echo "Version 2.9" - exit 0 -fi -if [ "$1" = "--version" ]; then - echo "Version 2.9" +if [ "$1" = "-v" -o "$1" = "--version" ]; then + if [ -z "$XCATROOT" ]; then + XCATROOT="/opt/xcat" + fi + perl -e 'use lib "$ENV{XCATROOT}/lib/perl"; use xCAT::Version; print xCAT::Version->Version() . "\n"' exit 0 fi