样本定制脚本
此定制脚本配置目标的 TCP/IP 域名解析和路由。
安装运行最新版AIX 的客户端时,应使用resolv_conf资源。
#!/bin/ksh CUSTOMIZING SCRIPT to set the hostname,
# establish the nameserver and DNS domain name,
# and configure the routing table for the
# target standalone client
# Truncate the host name
# if the host name is set to the fully qualified host name
#
#NOTE: This procedure will NOT result in a truncated host name if
#the bos installation operation is installing a mksysb image
#(ie. -a source=mksysb) unless the bos_inst operation is
#instructed not to configure the target as a NIM client upon
#completion (ie. unless -a no_nim_client=yes is specified)
#
chdev -l inet0 -a hostname =$(/usr/bin/hostname | cut -d. -f1)
# Set Name server and Domain Name
if [[ -f /etc/resolv.conf ]]
then
/usr/sbin/namerslv -E '/etc/resolv.conf.sv'
fi
/usr/sbin/namerslv -a -i '9.101.1.70'
/usr/sbin/namerslv -c 'enterprise.ca'
# Flush routing table and add default route
/etc/route -n -f
odmdelete -o CuAt -q "name=inet0 and attribute=route"
chdev -l inet0 -a route=net,,'0','9.101.1.70'