public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] chrony logrotate script EOF error
Date: Sun, 22 Aug 2010 17:44:53 +0100	[thread overview]
Message-ID: <201008221744.54658.michaelkintzios@gmail.com> (raw)
In-Reply-To: <201008221825.02919.alan.mckinnon@gmail.com>

[-- Attachment #1: Type: Text/Plain, Size: 1529 bytes --]

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
> 
> thusly:
> > Hi All,
> > 
> > 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?
> 
> 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 << 
EOF
       | /usr/bin/chronyc | sed '/^200 OK$/d'
       password $PASSWORD
       cyclelogs
       EOF
endscript
}
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-08-22 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 10:11 [gentoo-user] chrony logrotate script EOF error Mick
2010-08-22 10:25 ` Alex Schuster
2010-08-22 14:50   ` Mick
2010-08-22 16:25 ` Alan McKinnon
2010-08-22 16:44   ` Mick [this message]
2010-08-22 16:50     ` Alan McKinnon
2010-08-22 18:01       ` Mick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008221744.54658.michaelkintzios@gmail.com \
    --to=michaelkintzios@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox