大网数据广告活动
服务器运维问答

Can I unsilence kickstart step Performing post-installation setup tasks?

· 52CE 我爱测

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 ste…

问题原文

原帖链接 · 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 here

Another 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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-12-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。