rc.ntx 文件格式
用途
提供网络终端加速器适配卡的配置信息。
描述
/etc/rc.ntx 文件调用 hty_load 命令以装入 /etc/hty_config 文件。 此文件还可以使用 nTX_route 命令来指定到网关的路由。 此外, rc.ntx 文件会启用 SNMP。
/etc/rc.ntx 文件可用于执行不同的配置任务。 例如,要提供到其他网关的路由,请在有关其他路由的注释后立即添加以下行,并为 目的地 和 网关 参数提供 IP 地址:
/usr/bin/ntx_route -drhp$i net Destination
Gateway以下是该文件随软件包一起提供的文件。 您可以向文件添加其他命令,如上面所述。
echo "Executing hty_load"
/usr/bin/hty_load -f /etc/hty_config
echo "Finished executing hty_load"
#
# Maximum number of Network Terminal Accelerator adapters
# supported on each workstation.
#
MAX_RHP_DEVICES=7
i=0
while [ $i -le $MAX_RHP_DEVICES ]
do
if [ -f /etc/rhp$i.ntx_comun.conf ]; then
echo "Configuring SNMP communities on NTX
Adapter rhp$i"
/usr/bin/ntx_comun -d /dev/rhp$i -f
/etc/rhp$i.ntx_comun.conf
fi
if [ -f /etc/rhp$i.ntx_traps.conf ]; then
echo "Configuring SNMP traps on NTX Adapter rhp$i"
/usr/bin/ntx_traps -d /dev/rhp$i -f
/etc/rhp$i.ntx_traps.conf
fi
if [ -f /etc/rhp$i.ntx_nms.conf ]; then
echo "Configuring SNMP nms on NTX Adapter rhp$i"
/usr/bin/ntx_nms -d /dev/rhp$i -f
/etc/rhp$i.ntx_nms.conf
fi
if [ -f /etc/rhp$i.ntx_descr.conf ]; then
echo "Configuring SNMP site-specific variables on
NTX Adapter rhp$i"
/usr/bin/ntx_descr -d /dev/rhp$i -f
/etc/rhp$i.ntx_descr.conf
fi
if [ -c /dev/rhp$i ]; then
STATE=`lsattr -E -l rhp$i -a snmp -F value`
echo "Turning $STATE SNMP on NTX Adapter rhp$i"
/usr/bin/ntx_snmp -d /dev/rhp$i $STATE
fi
# Additional routes for each NTX Adapter can be added here
# example: /usr/bin/ntx_route -d /dev/rhp$i X.X.X X.X.X.X
i=`expr $i + 1` # increment count
done