[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Possible to log %post when using chroot?

-----Original Message-----
From: kickstart-list-bounces redhat com
[mailto:kickstart-list-bounces redhat com] On Behalf Of Pat

For example, I have a chrooted post section like this:

%post --log=/root/post.log
//do stuff 

I tried that but the commands and resulting error messages (if any) were
not logged with one exception. Within that post section, I did create a
run once script which runs after the first reboot. The output from that
script when it ran after the first reboot was recorded to the post.log
which I don't quite understand. I'm glad I can see the output however I
would like to see the results of the other post commands as well which
were done after the OS install and before the first reboot.

Remember that /root/post.log must exist before the chroot is created.
And the command is relative to the non-chrooted file structure.

The chroot will be /tmp/sysimage (at least for RHEL).

Most people I find put the log in /tmp

%post --log=/tmp/post.log
...commands here....

%post nochroot
mv /tmp/post.log /mnt/sysimage/var/log/post.log

Does that make sense?  If you want to put it in root's home, you should
use the file name of /tmp/sysimage/root/post.log.  You wouldn't need to
move it afterward.

Stan Hearn

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]