From e12bb46487c73dc4087b44d80aa7f9db8ea90007 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Mon, 13 May 2013 07:53:50 +0000 Subject: [PATCH] lsxcatd -v return error revision on debian/ubuntu(bug 3564) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16246 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/debian/rules | 2 +- perl-xCAT/modifyUtils | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/debian/rules b/perl-xCAT/debian/rules index 738db95d3..d98c40834 100755 --- a/perl-xCAT/debian/rules +++ b/perl-xCAT/debian/rules @@ -14,7 +14,6 @@ export DH_COMPAT=5 build: dh_testdir - ./modifyUtils `cat ../Version` `svn info | grep Revision | cut -d" " -f 2` ./db2man clean: @@ -49,6 +48,7 @@ binary-arch: build install chmod 644 `pwd`/debian/perl-xcat/opt/xcat/share/doc/man5/* chmod 644 `pwd`/debian/perl-xcat/opt/xcat/share/man/man7/* chmod 644 `pwd`/debian/perl-xcat/opt/xcat/share/doc/man7/* + ./modifyUtils `cat ../Version` `svn info | grep Revision | cut -d" " -f 2` # dh_installmenu # dh_installdebconf # dh_installlogrotate diff --git a/perl-xCAT/modifyUtils b/perl-xCAT/modifyUtils index c336e0d96..f987e5d6b 100755 --- a/perl-xCAT/modifyUtils +++ b/perl-xCAT/modifyUtils @@ -30,5 +30,10 @@ then sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new mv xCAT/Version.pm.new xCAT/Version.pm else - sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm + if [ -f "/etc/debian_version" ];then + FILENAME="debian/perl-xcat/opt/xcat/lib/perl/xCAT/Version.pm" + else + FILENAME="xCAT/Version.pm" + fi + sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ $FILENAME fi