Found EOL issue with logrotate.d/nagiosxi
Posted: Fri Jan 07, 2011 9:42 am
I've recently downloaded the trial of Nagiosxi and tracked down this error I was receiving:
The problem is that the file /etc/logrotate.d/nagiosxi has MS-DOS End-Of-Line characters which logrotate doesn't like.
This command should fix it:
sed --in-place 's/^M//' /etc/logrotate.d/nagiosxi
This is probably well known, but I couldn't find anything on it.
Brian
Code: Select all
/etc/cron.daily/logrotate:
error: nagiosxi:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: nagiosxi:2 unexpected text
error: nagiosxi:3 unexpected text
error: nagiosxi:4, unexpected text after {
error: nagiosxi:4 lines must begin with a keyword or a filename (possibly in double quotes)
This command should fix it:
sed --in-place 's/^M//' /etc/logrotate.d/nagiosxi
This is probably well known, but I couldn't find anything on it.
Brian