Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 232529

Summary: In anaconda kickstart environment, printf does not pad output correctly
Product: Red Hat Enterprise Linux 4 Reporter: Darren Patterson <darrenp1>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED WORKSFORME QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 4.4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-29 20:19:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Example kickstart none

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


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 14:15:55 UTC
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 13:55:34 UTC
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 14:29:39 UTC
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 16:03:18 UTC
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 23:01:42 UTC
Created attachment 153226 [details]
Example kickstart

Comment 6 Chris Lumens 2007-05-10 15:23:35 UTC
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 18:39:50 UTC
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 20:19:21 UTC
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.