From 530962940350b8e79769a4ae998164576a9e3daf Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 27 Jun 2014 13:27:43 +0200 Subject: [PATCH] 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 388109a65..08a6adb95 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..."