从 kickstart 构建的干净 RHEL5 将公共 IP 添加到 /etc/hosts

从 kickstart 构建的干净 RHEL5 将公共 IP 添加到 /etc/hosts

我们的基础设施有一个 Kickstart 服务器,它可以提供 RHEL6 版本,并提供一些处理自定义和配置的安装后脚本。我目前正在更新脚本,以便为需要它的少数实例处理 RHEL5。

此时,我已禁用 RHEL5 测试版本上脚本的自动执行,以便我可以手动运行它们并评估输出和错误。

我看到了一个我以前从未遇到过的奇怪现象。在这个干净的版本中,/etc/hosts 文件有一个公共 IP 条目(可能是我们的服务提供商之一)。我不知道它是如何添加的。NetworkManager 未配置为运行,我认为它甚至没有能力做到这一点。我也非常确定这不是任何版本的 RHEL 的默认行为。

有人之前见过这种情况吗?或者有人能建议我应该注意什么来预防这种情况?

#version=RHEL5.7
text
install
reboot
url --url http://10.153.166.3/inst/dist/rhel5-7
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto static --ip 10.153.139.105 --netmask 255.255.255.240 --gateway 10.153.139.97 --hostname=tcecapm1r5ls02.ecap.cciio
network --device eth1 --bootproto static --ip 10.153.172.62 --netmask 255.255.255.192
rootpw --iscrypted $1$Qr2vVb30$k8ggH.4XAhIfTWhjo3Ju6.
key --skip
firewall --port=22
authconfig --enableshadow --passalgo=sha512
selinux --disabled
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda,sdb --append="crashkernel=auto"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
zerombr
clearpart --all --initlabel --drives=sda

part /boot --fstype=ext3 --size=200 --ondisk=sda
part pv.01 --size=200 --grow --ondisk=sda
volgroup VolGroup00 pv.01
logvol swap --fstype=swap --size=512 --vgname=VolGroup00 --name=logvol-swap
logvol / --fstype=ext3 --size=200 --grow --vgname=VolGroup00 --name=logvol-root

%packages
@base
@core
expect
telnet
net-snmp
pax
python-dmidecode
sgpio
arpwatch
nmap
iptraf
dropwatch
arptables_jf
nfs-utils
-autofs
-SDL
-theora-tools
-libtiff
-cups-libs
-libxcb
-libfontenc
-wireless-tools
-openjpeg-libs
-pcmciautils
-iw
-libhugetlbfs-utils
-alsa-utils
-fontpackages-filesystem
-pixman
-libjpeg
-libthai
-make
-cdparanoia-libs
-qt-sqlite
-valgrind
-oprofile
-setserial
-bridge-utils
-redhat-indexhtml
-aic94xx-firmware
-b43-openfwwf
-b43-fwcutter
-bfa-firmware
-ipw2100-firmware
-ipw2200-firmware
-ivtv-firmware
-iwl100-firmware
-iwl1000-firmware
-iwl3945-firmware
-iwl4965-firmware
-iwl5000-firmware
-iwl5150-firmware
-iwl6000-firmware
-iwl6000g2b-firmware
-iwl6000g2a-firmware
-iwl6050-firmware
-libertas-usb8388-firmware
-netxen-firmware
-ql2100-firmware
-ql2200-firmware
-ql2400-firmware
-ql2500-firmware
-ql23xx-firmware
-rt61pci-firmware
-rt73usb-firmware
-xorg-x11-drv-ati-firmware
-zd1211-firmware
-mesa-dri-drivers
-hicolor-icon-theme
-libpng
-libogg
-libtheora
-libvorbis
-libvisual
-atk
-smartmontools
-ypbind
-ipa-client
-oddjob-mkhomedir
-freetype
-kexec-tools
-openswan
-qt
-cups
-portreserve
-xmlrpc-c
-samba-common
-samba-client
-samba-winbind-clients
-cifs-utils
-dejavu-fonts-common
-dejavu-sans-fonts
-python-matplotlib
-words
-atmel-firmware
-cairo
-fontconfig
-fprintd
-fprintd-pam
-ghostscript
-ghostscript-fonts
-gstreamer
-gtk2
-hwloc
-latencytop
-libXfont
-libXft
-libfprint
-pango
-phonon-backend-gstreamer
-pycairo
-qt
-qt3
-redhat-lsb-graphics
-urw-fonts
-xorg-x11-font-utils
-dosfstools
-seekwatcher
-poppler
-poppler-data
-foomatic
-foomatic-db
-foomatic-db-ppds
-redhat-lsb
-redhat-lsp-printing

%post
sed -i 's/ rhgb quiet//' /boot/grub/grub.conf
mkdir /usr/local/src/scripts
mkdir /usr/local/src/files
cd /usr/local/src/scripts
wget http://10.153.166.3/inst/post-install-dev/post-install-scripts.tar.gz
tar zxvf /usr/local/src/scripts/post-install-scripts.tar.gz
cd /usr/local/src/files
wget http://10.153.166.3/inst/post-install-dev/post-install-files.tar.gz
tar zxvf /usr/local/src/files/post-install-files.tar.gz
/usr/local/src/scripts/post-conf

编辑:添加了 kickstart 文件。

相关内容