问题原文
原帖链接 · sorin · CC BY-SA 4.0
While anaconda kickstart installer runs the "Performing post-installation setup tasks" tasks are not visible on console and their outcome is only saved to ks-post.log file.
I do want to also display it on the console as these steps could take a long time and there is a clear need to see what happens in real time.
How can I do this?
社区高分解答
原帖链接 · Aaron Copley · CC BY-SA 4.0
I have used a method similar to what is shown below.
Logging %pre and %post
When using a %pre or %post script you can simply log the output to a file by using --log=/path/to/file
%post --log=/root/my-post-log echo 'Hello, World!' enter code hereAnother way of logging and displaying the results on the screen would be the following:
%post exec < /dev/tty3 > /dev/tty3 chvt 3 echo echo "################################" echo "# Running Post Configuration #" echo "################################" ( echo 'Hello, World!' ) 2>&1 | /usr/bin/tee /var/log/post_install.log chvt 1
From: https://wiki.centos.org/TipsAndTricks/KickStart
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
