Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] logrotate - strange error message
Date: Mon, 10 May 2010 09:41:24
Message-Id: tkrat.4ed32ad6e42ade35@igpm.rwth-aachen.de
In Reply to: Re: [gentoo-user] logrotate - strange error message by Alan McKinnon
1 On 10 May, Alan McKinnon wrote:
2 > On Monday 10 May 2010 09:46:11 Helmut Jarausch wrote:
3 >> Hi,
4 >> I have the following file as /etc/logrotate.d/denyhosts
5 >> /var/log/denyhosts {
6 >> missingok
7 >> notifempty
8 >> create 0640 root root
9 >> sharedscripts
10 >> prerotate
11 >> /etc/init.d/denyhosts stop
12 >> endscript
13 >> postrotate
14 >> /etc/init.d/denyhosts start
15 >> endscript
16 >> }
17 >>
18 >> But this causes errors
19 >> reading config info for /var/log/denyhosts
20 >> error: denyhosts:1 lines must begin with a keyword or a filename (possibly
21 >> in double quotes) error: denyhosts:2 unexpected text
22 >> error: denyhosts:3 unexpected text
23 >> error: denyhosts:4 unexpected text
24 >> error: denyhosts:5 unexpected text
25 >> error: denyhosts:prerotate or postrotate without endscript
26 >
27 >
28 > That file is correct, so I'd first check the file that is read *before* that
29 > one, looking for things like missing end braces etc etc
30 >
31 > logrotate -d /etc/logrotate.conf will show the read order
32 >
33 >
34
35 Thanks, Alan,
36
37 the file before is indeed a bit different
38
39 # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 1.2 2004/07/18 02:25:02 dragonheart Exp $
40 #
41 # cups logrotate snippet for Gentoo Linux
42 #
43
44
45 /var/log/cups/error_log /var/log/cups/access_log /var/log/cups/page_log {
46 sharedscripts
47 postrotate
48 /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
49 endscript
50 }
51
52 It has multiple file names in the first line.
53 Is this OK?
54
55 Helmut.

Replies

Subject Author
Re: [gentoo-user] logrotate - strange error message Alan McKinnon <alan.mckinnon@×××××.com>