Bug 88783 - Extra Carriage Returns on %post commands
Summary: Extra Carriage Returns on %post commands
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda   
(Show other bugs)
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael Fulbright
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-14 04:41 UTC by Martin Rheumer
Modified: 2007-04-18 16:53 UTC (History)
1 user (show)

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: ---


Attachments (Terms of Use)

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 http://192.168.0.1/config.sh" >> 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:
Always

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 
%post

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

# add another nameserver
echo "nameserver 10.10.0.2" >> /etc/resolv.conf
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-
kickstart2-options.html

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.
Martin


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.


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