Bug 88783

Summary: Extra Carriage Returns on %post commands
Product: [Retired] Red Hat Linux Reporter: Martin Rheumer <martinr>
Component: anacondaAssignee: Michael Fulbright <msf>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: martinr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-05-12 21:43:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Martin Rheumer 2003-04-14 04:41:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
When using commands like this in my ks.cfg file in the %post section

echo "cd /tmp" > /etc/rc.d/rc.local
echo "wget" >> etc/rc.d/rc.local

The file in the /etc/rc.d/ directory looks like this.
[root@wpc004 rc.d]# ls -al 
total 23
drwxr-xr-x   10 root     root         4096 Mar 25 19:57 .
drwxr-xr-x   79 root     root         8192 Apr 14 12:28 ..
-rwxr-xr-x    1 root     root          220 Jul 11  2001 rc.local
-rwxr-xr-x    1 root     root           65 Jul 11  2001 rc.local?

It has added a ? sometimes this also appears as a \r

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

How reproducible:

Steps to Reproduce:
1. Create a boot floopy and a ks.cfg file for the kickstart
2. Add the 2 echo lines %post section
3. Boot server and look at /etc/rc.d/rc.local? when finished kickstart

Actual Results:  creates the extra lines \r on each line

Expected Results:  file just called rc.local

Additional info:

This is actually from an example at 

# add comment to /etc/motd
echo "Kickstart-installed Red Hat Linux `/bin/date`" > /etc/motd

# add another nameserver
echo "nameserver" >> /etc/resolv.conf

Comment 1 Michael Fulbright 2003-04-22 21:11:28 UTC
Did you edit the ks file under windows at anytime?

It worked fine for me when I tested your example.

Comment 2 Martin Rheumer 2003-04-22 22:24:45 UTC
Yes it was edited under windows and thinking this caused the
problem moved back to linux ( copying the file not re-creating though )
Could the Windows sessions have added this ?

Thanks for the comments.

Comment 3 Michael Fulbright 2003-05-12 21:43:26 UTC
Windows applications generally terminate a line with CR/LF, so yes thats
probably the problem.