[icinga-checkins] icinga.org: icinga2/support/2.0: Fix compatibility issue with base64 on CentOS 5

git at icinga.org git at icinga.org
Fri Jun 27 13:28:13 CEST 2014


Module: icinga2
Branch: support/2.0
Commit: 530962940350b8e79769a4ae998164576a9e3daf
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=530962940350b8e79769a4ae998164576a9e3daf

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri Jun 27 13:27:43 2014 +0200

Fix compatibility issue with base64 on CentOS 5

fixes #6373

---

 contrib/icinga2-setup-agent.cmake |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/icinga2-setup-agent.cmake b/contrib/icinga2-setup-agent.cmake
index 388109a..08a6adb 100644
--- a/contrib/icinga2-setup-agent.cmake
+++ b/contrib/icinga2-setup-agent.cmake
@@ -18,7 +18,7 @@ if [ -n "$1" ]; then
 		exit 1
 	fi
 
-	if ! base64 -d $1 >/dev/null 2>&1; then
+	if ! base64 -i -d $1 | tar ztf >/dev/null 2>&1; then
 		echo "The bundle file is invalid or corrupted."
 		exit 1
 	fi
@@ -114,7 +114,7 @@ if [ -n "$1" ]; then
 	fi
 
 	echo "Installing the certificate bundle..."
-	base64 -d < $1 | tar -C $ICINGA2CONFIG/pki/ -zx || exit 1
+	base64 -i -d < $1 | tar -C $ICINGA2CONFIG/pki/ -zx || exit 1
 	chown @ICINGA2_USER@:@ICINGA2_GROUP@ $ICINGA2CONFIG/pki/* || exit 1
 
 	echo "Setting up api.conf..."



More information about the icinga-checkins mailing list