Bug 88783 - Extra Carriage Returns on %post commands
Extra Carriage Returns on %post commands
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Fulbright
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-14 00:41 EDT by Martin Rheumer
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-12 17:43:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Martin Rheumer 2003-04-14 00:41:48 EDT
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 17:11:28 EDT
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 18:24:45 EDT
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 17:43:26 EDT
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.