RE: Possible to log %post when using chroot?

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

 



-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] 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.

Regards,
Stan Hearn

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux