Discussion Locked

logrotate

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to use “logrotate” (3.5.2) on a Solaris 8 system (popt 1.6.3 is installed). When it is run I get a number of errors in the format:

error: /etc/logrotate.conf:1 unexpected text
error: /etc/logrotate.conf:2 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:3 unexpected text

I have tried reformatting “/etc/logrotate.conf” the file works correctly on a “linux” box, but when copied to the Solaris box I get the unexpected text errors.

Any ideas?

2 replies

by cpfeiffe

Syntax and locations of executables are probably what is causing the problem. Some things will be different between Linux and Solaris. Also the shell that is executing the program may be different (i.e. bash on linux and sh on Solaris) so there will be some differences there. Perhaps you can try loading calling the script with bash on Solaris. Or maybe it is trying to do that because of the header of the script and you don't have bash installed on the Solaris box. Short of that I could probably fix this if you sent a copy of the conf file to me, removing/replacing any secure data. My alias is my current email address.

by lyle148806

Sorry this reply took so long, another project took priority. The problem appears in the end to be caused by the porting of some of the library routines and nothing to do with the conf file. In the end, I just went back to a less "nice" script to roll my logs.

This discussion is closed to new replies.