Re: logrotate failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Craig White <craigwhite@xxxxxxxxxxx> wrote:

On Mon, 2006-11-20 at 07:36 -0500, Gene Heskett wrote:
> Greetings;
> > Two weeks now since I installed FC6, and still no logrotation is being > done. > > Stepping into /etc/logrotate.d, and doing an sh ./syslog results in this: > > [root@coyote logrotate.d]# sh ./syslog
> ./syslog: line 1: /var/log/messages: Permission denied
> ./syslog: line 2: sharedscripts: command not found
> ./syslog: line 3: postrotate: command not found
> ./syslog: line 5: endscript: command not found
> ./syslog: line 6: syntax error near unexpected token `}'
> ./syslog: line 6: `}'
----
not that I wish to follow in your footsteps but if it's any consolation,
that occurs when I do that on my system too. But I am not going to spend
any time trying to figure out why.
It happened because it's supposed to happen. The files in /etc/logrotate.d aren't executable. They're configuration files for each of the logs that logrotate acts on.

If you want to try running logrotate, your best bet would probably be to run the file in /etc/cron.daily:

# cat /etc/cron.daily/logrotate
#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
   /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

but verify the rpms first.

Cheers,
Dave

--
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux