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 15:50:50 +0100	[thread overview]
Message-ID: <201008221550.52229.michaelkintzios@gmail.com> (raw)
In-Reply-To: <201008221225.06183.wonko@wonkology.org>

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

On Sunday 22 August 2010 11:25:05 Alex Schuster wrote:
> 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.

Thanks!  I've used your suggestion and will see if the error goes away.
-- 
Regards,
Mick

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

  reply	other threads:[~2010-08-22 14:51 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 [this message]
2010-08-22 16:25 ` Alan McKinnon
2010-08-22 16:44   ` Mick
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=201008221550.52229.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