Re: Catch the error...

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pablo Bernasconi wrote:
> Hello to everyone,
> 
> I need to catch the log/error of the %post section (the things that are
> shown if you do* Alt + F3* while the post-script is running) and send it
> to a file.
> 
> How can I do this????

Run your scripts in a subshell and redirect STDOUT and STDERR to a log file.

%post --nochroot
(
mkdir /mnt/sysimage/usr/src/FSR/
cp /mnt/stage2/FSR/*  /mnt/sysimage/usr/src/FSR/
) 2>&1 > /mnt/sysimage/root/ks-post.log

%post
(
cd /usr/src/FSR/
tar -xvzf ....
cd ....
make
make install
....
eject
) 2>&1 > /root/ks-post.log

https://fedorahosted.org/pipermail/cobbler/2008-August/000492.html
- --
Kyle Powell | Red Hat | Senior Consultant, RHCE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFKJGYL7pTtanQdBU4RAqomAJ99twsyf/fj8/L8raBJb7vc4epBwACfWb5q
xwwCbCOvkHfrQKkchTXOcfw=
=thYy
-----END PGP SIGNATURE-----

_______________________________________________
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