Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] chrony logrotate script EOF error
Date: Sun, 22 Aug 2010 16:28:31
Message-Id: 201008221825.02919.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] chrony logrotate script EOF error by Mick
1 Apparently, though unproven, at 12:11 on Sunday 22 August 2010, Mick did opine
2 thusly:
3
4 > Hi All,
5 >
6 > The chrony installed logrotate script keeps erroring out:
7 > ========================================================
8 > logrotate_script: line 5: warning: here-document at line 2 delimited by
9 > end- of-file (wanted `EOF')
10 > Unrecognized command
11 > ========================================================
12 >
13 > This is the script:
14 > ========================================================
15 > /var/log/chrony/*.log {
16 > sharedscripts
17 > postrotate
18 > PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}'
19 > /etc/chrony/chrony.keys`
20 > cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
21 > password $PASSWORD
22 > cyclelogs
23 > EOF
24 > endscript
25 > }
26 > ========================================================
27 >
28 > I do not understand the error. Is it telling me to add backticks? Where?
29
30
31 No, it's saying it wants EOF on a line all by itself with no leading
32 whitespace. That thing that looks like a backtick is an open quote.
33
34
35 --
36 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] chrony logrotate script EOF error Mick <michaelkintzios@×××××.com>