Bug 101671 - snmptrapd init script contains invisible carriage returns in script
Summary: snmptrapd init script contains invisible carriage returns in script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: ucd-snmp
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Brock Organ
URL: http://bugzilla.redhat.com/bugzilla
Whiteboard: Dell MUSTFIX bug as well (106464)
: 101939 106464 (view as bug list)
Depends On:
Blocks: 87937
TreeView+ depends on / blocked
 
Reported: 2003-08-05 14:34 UTC by Sherif Abdelgawad
Modified: 2015-03-05 01:12 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-09 10:42:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sherif Abdelgawad 2003-08-05 14:34:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823
Netscape/7.0

Description of problem:
The snmptrapd init script (/etc/rc.d/init.d/snmptrapd) contains invisible
carriage returns which produces the errors when trying to use it.


Version-Release number of selected component (if applicable):
ucd-snmp-4.2.4-1

How reproducible:
Always

Steps to Reproduce:
1.Install ucd-snmp-4.2.4-1 RPM
2.run: service snmptrapd start
3. Examine /etc/init.d/snmptrapd by :
   cat -A /etc/init.d/snmptrapd
     or
   vi -b /etc/init.d/snmptrapd

    

Actual Results:  - Running: "service snmptrapd start" results in error
lboots3:~# service snmptrapd start
/sbin/service: /etc/init.d/snmptrapd: bad interpreter: No such file or directory

- Running: cat -A /etc/init.d/snmptrapd
#!/bin/bash^M$
^M$
# ucd-snmp init file for snmptrapd^M$
#^M$
# chkconfig: - 50 50^M$
# description: Simple Network Management Protocol (SNMP) Trap Daemon^M$
#^M$
# processname: /usr/sbin/snmptrapd^M$
# config: /etc/snmp/snmptrapd.conf^M$
<snip>

- Running: "vi -b /etc/init.d/snmptrapd"
!/bin/bash^M
^M
# ucd-snmp init file for snmptrapd^M
#^M
# chkconfig: - 50 50^M
<snip>


Expected Results:  - Running: "service snmptrapd start":
Starting snmptrapd:                                        [  OK  ]

==> Starts without errors

- Examining the file by car or vi does not have the ^M / (\r).

Additional info:

Problem can be overcome by stripping all "^M"'s from the init script and repackage.

Comment 1 Phil Knirsch 2003-08-05 14:42:02 UTC
There is currently an errata pending for AS2.1 that fixes this problem.

Read ya, Phil

Comment 2 Phil Knirsch 2003-08-08 12:16:19 UTC
*** Bug 101939 has been marked as a duplicate of this bug. ***

Comment 3 Florian La Roche 2003-09-22 16:18:35 UTC
Putting this into modified, rpm is built into 2.1AS-errata-candidate

Comment 4 Florian La Roche 2003-10-08 08:52:56 UTC
*** Bug 106464 has been marked as a duplicate of this bug. ***

Comment 6 Phil Knirsch 2003-12-09 10:42:56 UTC
Errata for ucd-snmp has been released for AS2.1 with a fix for this
problem, closing bug as Errata.

Read ya, Phil


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