Bug 122488 - CRLF formatting in /etc/sysconfig/spamassassin breaks init script
Summary: CRLF formatting in /etc/sysconfig/spamassassin breaks init script
Alias: None
Product: Fedora
Classification: Fedora
Component: spamassassin (Show other bugs)
(Show other bugs)
Version: 1
Hardware: i386 Linux
Target Milestone: ---
Assignee: Chip Turner
QA Contact:
Depends On:
Blocks: 123710
TreeView+ depends on / blocked
Reported: 2004-05-05 04:13 UTC by Brad Bailey
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-25 20:38:12 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Brad Bailey 2004-05-05 04:13:43 UTC
From Bugzilla Helper:
User-Agent: Opera/7.23 (X11; Linux i686; U)  [en]

Description of problem:
The configuration file /etc/sysconfig/spamassassin, as packaged with 
the spamassassin RPM, is formatted with CRLF line-ends. This breaks 
the initialization script when additional settings such as NICELEVEL 
are entered into this file to be sourced during service startup 
and/or shutdown.

This is trivial to fix, once noticed, but the resulting error 
reported by the init script is misleading, and the true problem of 
the DOS-formatted file is not at all obvious.

I have checked the spamassassin packages for Fedora Core 1, Fedora 
Core 2 test 3, Rawhide, and even Red Hat 9, and this file is in DOS 
format in each and all of them.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Check format of /etc/sysconfig/spamassassin:

 root@localhost# file /etc/sysconfig/spamassassin
 /etc/sysconfig/spamassassin: ASCII text, with CRLF line terminators

2. Edit /etc/sysconfig/spamassassin and add a NICELEVEL option:

 root@localhost# vi /etc/sysconfig/spamassassin
 # Options to spamd 
 SPAMDOPTIONS="-d -c -a -m5 -H"
 # Add this line: 

3. Check format of /etc/sysconfig/spamassassin again:

 root@localhost# file /etc/sysconfig/spamassassin
 /etc/sysconfig/spamassassin: ASCII text, with CRLF line terminators
4. Attempt to start the service:

 root@localhost# service spamassassin start

Actual Results:  The service fails to start because of an invalid 
parameter being passed to `nice`:

 'tarting spamd: nice: invalid priority `19

Expected Results:  The service should have started, with a nice level 
as specified in the sysconfig file.

Additional info:

After adding a `set -x` in the init script:

root@localhost# service spamassassin start
 + '[' color = verbose -a -z '' ']'
 + '[' -z '' ']'
 ' nice -n $'19\r' initlog -q -c 'spamd -d -c -a -m5 -H
 'ice: invalid priority `19

Converting the file to standard UNIX ASCII text, as all other files 
in /etc/sysconfig are, solves the problem.

Comment 1 Warren Togami 2004-05-25 20:38:12 UTC
fixed in spamassassin-3.0-0.0.svn20040524

Note You need to log in before you can comment on or make changes to this bug.