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 1OnDfm-00025c-CT for garchives@archives.gentoo.org; Sun, 22 Aug 2010 16:45:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0154E0684; Sun, 22 Aug 2010 16:44:58 +0000 (UTC) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 8189BE0684 for ; Sun, 22 Aug 2010 16:44:58 +0000 (UTC) Received: by wyf28 with SMTP id 28so6918423wyf.40 for ; Sun, 22 Aug 2010 09:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=buI0b+s1Q+E7Z5g3ltOESC6HVLrIbpNAXTINAutkZLM=; b=ZNk7IZ6/RYJg9Nm+nNSJNdkdp1iahWCUBk1TGO8SNxdhF8a6FUELu9ZRk57fJ+s5yL Jn/z8IpU6XCFcx05c3TwjfFKb0t0s1we3CLm7+yJolonl3IqDAOunctfsIn6IH+dy35K ReK0pVwVmRAZFdWBfNKjotmSyTO4f9CZd4tY4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=VqEJqOO/zAA+jlL7gKwHb+qrIjevq1jKnRuZM1JPx7uX+0H6SLhIu5vD6FSmmLyq5p qMqW+217dOPAkysR6NKreiOsRWfSY7Bc50/xiClhaBNw2hF16/nnh3w0M0jNsBx8eIid mkgdGqWJ1ocXiM/OD/OfVyRkJnJaAF2VoLzQI= Received: by 10.227.68.149 with SMTP id v21mr3526991wbi.138.1282495497947; Sun, 22 Aug 2010 09:44:57 -0700 (PDT) Received: from (230.3.169.217.in-addr.arpa [217.169.3.230]) by mx.google.com with ESMTPS id b23sm4249683wbb.4.2010.08.22.09.44.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Aug 2010 09:44:57 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] chrony logrotate script EOF error Date: Sun, 22 Aug 2010 17:44:53 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.34-gentoo-r1; KDE/4.4.5; x86_64; ; ) References: <201008221111.23277.michaelkintzios@gmail.com> <201008221825.02919.alan.mckinnon@gmail.com> In-Reply-To: <201008221825.02919.alan.mckinnon@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: multipart/signed; boundary="nextPart3308999.iKjaeVqf9o"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201008221744.54658.michaelkintzios@gmail.com> X-Archives-Salt: 6c37c4c0-5769-4261-ab0b-458ae8955057 X-Archives-Hash: 3628720b113d28f1e0c0630c2abcbcdf --nextPart3308999.iKjaeVqf9o Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 22 August 2010 17:25:02 Alan McKinnon wrote: > Apparently, though unproven, at 12:11 on Sunday 22 August 2010, Mick did > opine >=20 > thusly: > > Hi All, > >=20 > > The chrony installed logrotate script keeps erroring out: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > logrotate_script: line 5: warning: here-document at line 2 delimited by > > end- of-file (wanted `EOF') > > Unrecognized command > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > >=20 > > This is the script: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > /var/log/chrony/*.log { > >=20 > > sharedscripts > > postrotate > > =09 > > PASSWORD=3D`awk '$1 ~ /^1$/ {print $2; exit}' > >=20 > > /etc/chrony/chrony.keys` > >=20 > > cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d' > > password $PASSWORD > > cyclelogs > > EOF > > =20 > > endscript > >=20 > > } > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > >=20 > > I do not understand the error. Is it telling me to add backticks?=20 > > Where? >=20 > No, it's saying it wants EOF on a line all by itself with no leading > whitespace. That thing that looks like a backtick is an open quote. Hmm ... so what should the corrected logrotate script look like then? cat <<=20 EOF | /usr/bin/chronyc | sed '/^200 OK$/d' password $PASSWORD cyclelogs EOF endscript } =2D-=20 Regards, Mick --nextPart3308999.iKjaeVqf9o Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEABECAAYFAkxxVAYACgkQVTDTR3kpaLbFrgCgl9we1muInfHhiE4LRgRig5Gb R3MAoIXgx3emXRly3Yk1WoHQ95r0+Fm4 =00g1 -----END PGP SIGNATURE----- --nextPart3308999.iKjaeVqf9o--