Bug 232529 - In anaconda kickstart environment, printf does not pad output correctly
Summary: In anaconda kickstart environment, printf does not pad output correctly
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda
Version: 4.4
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Chris Lumens
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-15 23:58 UTC by Darren Patterson
Modified: 2007-11-17 01:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-29 20:19:21 UTC
Target Upstream Version:
Embargoed:


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

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.


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