Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 198670 - bogus chars show up in custom scripts for kickstarts
bogus chars show up in custom scripts for kickstarts
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike McCune
Beth Nackashi
Depends On:
Blocks: rhn410-kickstart
  Show dependency treegraph
Reported: 2006-07-12 13:09 EDT by Matthew Davis
Modified: 2007-10-29 21:57 EDT (History)
1 user (show)

See Also:
Fixed In Version: rhn410
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-19 16:19:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Davis 2006-07-12 13:09:16 EDT
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:

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

How reproducible:

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 15:41:29 EDT
available if you upgrade your java rpms to:


Comment 2 Matthew Davis 2006-07-12 17:12:56 EDT
Works like a charm!  I don't want to konw how, but it works :)
Comment 3 Beth Nackashi 2006-07-19 16:19:12 EDT
moving to closed - currentrelease

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