- Red Hat Enterprise Linux 5.6
- Only STDERR are logged into a file when using %post --log-file in RHEL5.6 or %post --log-file seems corrupted after installation
- Problem is fixed in RHBA-2012:0197
- Anaconda does not redirect the STDOUT output to a file when using %post --log-file option
Steps to Reproduce:
- Create a kickstart for RHEL5.6
Create a %post kickstart script as below:
%post --logfile /root/ks-post.log.2 perl -e 'print STDOUT "1: on stdout\n";' perl -e 'print STDERR "2: on stderr\n";' perl -e 'print STDOUT "3: on stdout\n";' perl -e 'print STDERR "4: on stderr\n";'
Kickstart the client machine
Only the STDERR are logged.
[root@client_box ~]# cat ks-post.log.2 2: on stderr 4: on stderr
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.