]> granicus.if.org Git - icinga2/commitdiff
Fix compatibility issue with base64 on CentOS 5
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 27 Jun 2014 11:27:43 +0000 (13:27 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 27 Jun 2014 11:27:43 +0000 (13:27 +0200)
fixes #6373

contrib/icinga2-setup-agent.cmake

index 388109a65da5675cca42e05e4283d13d4d700ec5..08a6adb9523b5f4e85386c54253644275b641164 100644 (file)
@@ -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..."