From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1On7k9-0004uU-H3 for garchives@archives.gentoo.org; Sun, 22 Aug 2010 10:25:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B724DE07CF; Sun, 22 Aug 2010 10:25:08 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id 86A37E07CF for ; Sun, 22 Aug 2010 10:25:08 +0000 (UTC) Received: from weird.localnet (p4FF041DA.dip.t-dialin.net [79.240.65.218]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.virtyou.com (Postfix) with ESMTPSA id 0B94C39A001 for ; Sun, 22 Aug 2010 12:25:08 +0200 (CEST) From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] chrony logrotate script EOF error Date: Sun, 22 Aug 2010 12:25:05 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34-tuxonice-r1; KDE/4.5.0; x86_64; ; ) References: <201008221111.23277.michaelkintzios@gmail.com> In-Reply-To: <201008221111.23277.michaelkintzios@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201008221225.06183.wonko@wonkology.org> X-Archives-Salt: 41025836-8444-47e8-ac5b-d54bb1f4c44a X-Archives-Hash: 8a30216f5c1d1c11fc6bec51d01837a9 Mick writes: > The chrony installed logrotate script keeps erroring out: > ======================================================== > logrotate_script: line 5: warning: here-document at line 2 delimited by > end- of-file (wanted `EOF') > Unrecognized command > ======================================================== > > This is the script: > ======================================================== > /var/log/chrony/*.log { > sharedscripts > postrotate > PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' > /etc/chrony/chrony.keys` > cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d' > password $PASSWORD > cyclelogs > EOF > endscript > } > ======================================================== > > I do not understand the error. Is it telling me to add backticks? > Where? I don't know the logrotate syntax, but in bash this would not work if the ending EOF has leading whitespace. Try replacing the '<<' by '<<-', then whitespace is allowed. Wonko