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 1OnBt9-0006rb-6F for garchives@archives.gentoo.org; Sun, 22 Aug 2010 14:51:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC571E07B3; Sun, 22 Aug 2010 14:50:55 +0000 (UTC) Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 8F3DFE07B3 for ; Sun, 22 Aug 2010 14:50:55 +0000 (UTC) Received: by wwb39 with SMTP id 39so3922961wwb.10 for ; Sun, 22 Aug 2010 07:50:55 -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=/84oqrh9YYKE9A8wcHAvw9KAxq01iudBWDf2vU9Yy7w=; b=ogKs01Mkzuzx+B+W+9aau9bUaxhtlpzjBEL4xN1BWeY3z6RlBAY4qVdAU3a9YltYzq rC4Arptwf8BeiAWWWjTXZnxNRsKoXofplUd1HD3VVdZA7KonV07SGaiTPAqu2UEebjnZ E+Qw7RafwLQxF2p6lWvqqfsF+45xugtabuzg4= 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=XZeqNnkcHsecVqnexAw+Z/tIZK3wZlr0LAvZXm5svMfSiFrNcqFrg9caNJl1QR5MQ1 2ykTNQIsB4pcjtXp6JVUYqsDUjOJ+/hkDuqEUvAhcxGmzHdXsbC1/Hud3IZd3qhF9906 HxzS40U5qo8WqMUsUUf+xvee4DdztquhsrOH8= Received: by 10.216.232.229 with SMTP id n79mr3380443weq.52.1282488654986; Sun, 22 Aug 2010 07:50:54 -0700 (PDT) Received: from (230.3.169.217.in-addr.arpa [217.169.3.230]) by mx.google.com with ESMTPS id h37sm3031242wej.47.2010.08.22.07.50.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Aug 2010 07:50:54 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] chrony logrotate script EOF error Date: Sun, 22 Aug 2010 15:50:50 +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> <201008221225.06183.wonko@wonkology.org> In-Reply-To: <201008221225.06183.wonko@wonkology.org> 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="nextPart3718710.8TprP8PLJ4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201008221550.52229.michaelkintzios@gmail.com> X-Archives-Salt: d94eeb43-9214-45d4-8218-6c4d2e61c49e X-Archives-Hash: 43a69519569fdb7d444b036d6db50f01 --nextPart3718710.8TprP8PLJ4 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On Sunday 22 August 2010 11:25:05 Alex Schuster wrote: > Mick writes: > > 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? > > Where? >=20 > 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. Thanks! I've used your suggestion and will see if the error goes away. =2D-=20 Regards, Mick --nextPart3718710.8TprP8PLJ4 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) iEYEABECAAYFAkxxOUwACgkQVTDTR3kpaLbt5QCgm4WkWqGf9F1s1ZscOlsZC7pH 0TsAn0YwnDS17qWFTYj/glvS1iVaOhVT =qjjX -----END PGP SIGNATURE----- --nextPart3718710.8TprP8PLJ4--