From b7c2cfe0db2843536c7504983cdac08822d7bb6a Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 17 Jun 2011 11:09:09 +0000 Subject: [PATCH] fix defect 3317760 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9839 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatsnap | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-server/sbin/xcatsnap b/xCAT-server/sbin/xcatsnap index 56fb0da62..7037aab3e 100755 --- a/xCAT-server/sbin/xcatsnap +++ b/xCAT-server/sbin/xcatsnap @@ -340,7 +340,7 @@ print "Compiling Information...\n"; print "Information compiled...\n"; `chmod 400 $LogFile`; # Processing the log file print "Send $LogFile to IBM Support.\n"; - +my $donotdelete=0; if ( `which gunzip` == 0 ) { # Compressing the tar file `gzip -f $TarFile`; } @@ -350,10 +350,11 @@ elsif ( `which compress` == 0 ) { else { print "gzip and compress are not available. The tar file $TarFile will not be compressed"; +$donotdelete=1; } -if (-e $TarFile ){ - rm $TarFile; +if (-e $TarFile && $donotdelete == 0){ # Don't remove if only file to send + `rm $TarFile`; } if ( -e $TarFile . ".gz" ) {