Blob Blame History Raw
From 53e51059c4e95fab6c3601952069191343fe92b3 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins@redhat.com>
Date: Mon, 20 Jul 2015 10:31:46 -0600
Subject: [PATCH 28/30] Ticket #48224 - redux 2 - logconv.pl should handle
 *.tar.xz, *.txz, *.xz log files

https://fedorahosted.org/389/ticket/48224
Reviewed by: nhosoi (Thanks!)
Branch: 389-ds-base-1.3.4
Fix Description: Use $? instead of $! to get pipe errors.
Platforms tested: Fedora 21, RHEL 7.2 candidate
Flag Day: no
Doc impact: no

(cherry picked from commit 29043c5716a1bc8364689d518cb4e35722eaaf77)
(cherry picked from commit 0e31d818366e846f45c60b2c24bdb8026a82c048)
---
 ldap/admin/src/logconv.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 0038a03..3113f8a 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -437,9 +437,9 @@ sub doUncompress {
 		# so use the xz command directly
 		# NOTE: This doesn't work if the argument is a file handle e.g. from
 		# Archive::Tar
-		$! = 0; # clear
-		if (!open($TARFH, "xz -dc $_ |") or $!) {
-			openFailed($!, $_);
+		$? = 0; # clear
+		if (!open($TARFH, "xz -dc $_ |") or $?) {
+			openFailed($?, $_);
 			return;
 		}
 	} else {
-- 
1.9.3