Show Table of Contents
33.10. 预安装脚本

图 33.13. 预安装脚本
可以添加系统在解析 kickstart 文件后,且安装开始前马上要运行的命令。如果在 kickstart 文件中配置了网络,则会在处理这部分之前弃用网络。如果要包括一个预安装脚本,请在文本区域内输入。
重要
Red Hat Enterprise Linux 之前的发行本中的 anaconda 版本包含可在预安装和后安装环境中提供 shell 命令的 busybox 版本。 Red Hat Enterprise Linux 6 中的 anaconda 不再包含 busybox,而使用 GNU bash 命令。
更多详情请参考 附录 G, 备选 busybox 命令。
要指定执行脚本的脚本语言,选中 使用解释器 选项,并在文本框里输入解释器。例如,对于 Python 脚本可以指定
/usr/bin/python2.6。这个选项相当于在 kickstart 文件中使用 %pre --interpreter /usr/bin/python2.6。
Only the most commonly used commands are available in the pre-installation environment. See 第 32.6 节 “预安装脚本” for a complete list.
重要
不要包括
%pre,系统会自动添加。
注意
预安装脚本是在挂载安装介质以及安装第二阶段引导装载程序后执行的。因此,不可能在预安装脚本里改变安装介质。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.