This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 122488 - CRLF formatting in /etc/sysconfig/spamassassin breaks init script
CRLF formatting in /etc/sysconfig/spamassassin breaks init script
Product: Fedora
Classification: Fedora
Component: spamassassin (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Chip Turner
Depends On:
Blocks: 123710
  Show dependency treegraph
Reported: 2004-05-05 00:13 EDT by Brad Bailey
Modified: 2007-11-30 17:10 EST (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Brad Bailey 2004-05-05 00:13:43 EDT
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 16:38:12 EDT
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.