Bug 198670 - bogus chars show up in custom scripts for kickstarts
Summary: bogus chars show up in custom scripts for kickstarts
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning   
(Show other bugs)
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike McCune
QA Contact: Beth Nackashi
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: rhn410-kickstart
TreeView+ depends on / blocked
 
Reported: 2006-07-12 17:09 UTC by Matthew Davis
Modified: 2007-10-30 01:57 UTC (History)
1 user (show)

Fixed In Version: rhn410
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-19 20:19:12 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 Matthew Davis 2006-07-12 17:09:16 UTC
Description of problem:
In custom %pre/%post scripts bogus chars will show up at the end of the line,
which will cause bash to get confused and not konw what to do.  If you 'wget'
the kickstart and pull the kickstart in vi, you'll see something like this:

%post
(^M
echo "What is my shell?"^M
echo $SHELL^M
echo "running ls /etc/sysconfig/rhn"^M
ls /etc/sysconfig/rhn^M
echo "About to run perl"^M
perl -npe 's/useGPG=1/useGPG=0/g' -i /etc/sysconfig/rhn/up2date^M
echo "running grep"^M
grep -i gpg /etc/sysconfig/rhn/up2date^M
echo "about to run up2date"^M
up2date osad rhncfg-actions^M


Note the ^M's cause bash to fail. 

Version-Release number of selected component (if applicable):
rhn-satellite-4.1.0-136-redhat-linux-as-i386-4-embedded-oracle.iso

How reproducible:
Everytime

Steps to Reproduce:
1. Create a kickstart profile
2. Create custom %post or %pre
3. Add commands to it, make sure there are carriage returns
4. wget http://<host>/kickstart/ks/label/<profile>
5. vi <profile>
6. Scroll down to the %pre or %post section.

Actual results:
^M ending all added lines

Expected results:
Clean text

Comment 1 Mike McCune 2006-07-12 19:41:29 UTC
available if you upgrade your java rpms to:

4.1.0-778



Comment 2 Matthew Davis 2006-07-12 21:12:56 UTC
Works like a charm!  I don't want to konw how, but it works :)

Comment 3 Beth Nackashi 2006-07-19 20:19:12 UTC
moving to closed - currentrelease


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