Description of problem:
I had a post script that downloaded a setup script then runs it. This script
installs an rpm, then runs a script from that rpm. However, the script could
not install the rpm because it claimed it wasn't there.
Further inspection leads me to believe that:
- a post script gets executed inside the chroot (at /mnt/sysimage)
- its cwd is the real /, and not the chrooted /
This is evidenced by the fact that both the downloaded script and the rpm ended
up in /, and not in /mnt/sysimage where I expected them.
I used the same mechanism on FC5 without problems.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Created a ks file
2. use this post script:
echo "one" > post.log
echo "two" > /root/post.log
3. install machine with ks file and check on the console
after completion of post scripts but before rebooting, machine has /post.log and
should have /mnt/sysimage/post.log and /mnt/sysimage/root/post.log
If it matters, my install was done over PXE, with vnc enabled.
Created attachment 153287 [details]
set cwd for scripts
I'm attaching a patch that corrects this issue for my future reference.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Verified with RHEL5.1-Server-20070906.nightly
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.