Bug 232529 - In anaconda kickstart environment, printf does not pad output correctly
In anaconda kickstart environment, printf does not pad output correctly
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Chris Lumens
Depends On:
  Show dependency treegraph
Reported: 2007-03-15 19:58 EDT by Darren Patterson
Modified: 2007-11-16 20:14 EST (History)
0 users

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

Attachments (Terms of Use)
Example kickstart (4.62 KB, text/plain)
2007-04-20 19:01 EDT, Darren Patterson
no flags Details

  None (edit)
Description Darren Patterson 2007-03-15 19:58:19 EDT
Description of problem:
When installing (kickstart), the following command issues the wrong output:
# printf "%02" 11

It should return "0B" but it appears that padding doesn't work.

This is only within the installation environment (EG %pre).
Comment 1 Chris Lumens 2007-03-16 10:15:55 EDT
The printf being used in %pre scripts is the busybox printf, while one being
used on the running system or in %post scripts is the real GNU one.
Comment 2 Ivana Varekova 2007-04-17 09:55:34 EDT
I'm not sure I know what is the problem -
I just test the command 
/sbin/busybox.anaconda printf "%02X" 11
with busybox-anaconda-1.2.0-3
and the result is right "0B".
Please what version of busybox do you have?

Comment 3 Ivana Varekova 2007-04-17 10:29:39 EDT
I'm sorry I mess the version number. In rhel4 version of busybox there is not
implemented printf command. 
Comment 4 Chris Lumens 2007-04-20 12:03:18 EDT
Darren - A quick test here showed that it works fine for me.  Could you please
post your complete kickstart file so I can try a better test?  You can delete
passwords and other sensitive information, of course.
Comment 5 Darren Patterson 2007-04-20 19:01:42 EDT
Created attachment 153226 [details]
Example kickstart
Comment 6 Chris Lumens 2007-05-10 11:23:35 EDT
I'm still unable to reproduce this problem with RHEL4u4.  Can you think of any
additional information that might help to diagnose what's going on?
Comment 7 Darren Patterson 2007-05-29 14:39:50 EDT
I don't use this functionality in my kickstarts any more after I ran into this
problem (I use a cgi to handle kickstart templating for %pre/%post scripts now).
 Testing in vmware with U3 and U4 under VMware, and I don't have a free box to
PXE boot for testing this.

My apologies since I can't reproduce the problem.
Comment 8 Chris Lumens 2007-05-29 16:19:21 EDT
Closing this bug as WORKSFORME since I was unable to reproduce the problem and
hardware is no longer available for testing.  If you are able to reproduce it
again at a later date, feel free to reopen this bug report.  Thanks for your time.

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