User`s guide
Protogate Freeway Security Features User’s Guide (SFUG) Appendix A. Sample rc.startsra File
echo "${LOG_DIR}/sraweb_all.log 644 31
*
@T05 WZ" >> /etc/newsyslog.conf
echo "SHELL=/bin/sh" > /etc/crontab
echo "PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin" >> /etc/crontab
echo "HOME=/var/log" >> /etc/crontab
echo "B_FWY_SERVERNAME=${B_FWY_SERVERNAME}" >> /etc/crontab
echo "MAILTO=\"\"" >> /etc/crontab
echo "TZ=\"\"" >> /etc/crontab
echo "#" >> /etc/crontab
echo "#minute hour mday month wday who command" >> /etc/crontab
echo "#" >> /etc/crontab
echo "0
* * * *
root newsyslog" >> /etc/crontab
echo "0 5
* * *
root sh /tmp/httplog_rotate.sh" >> /etc/crontab
if [ -x /usr/sbin/cron ]; then
/usr/sbin/cron
fi
# figure out which type Ethernets we have, fxp0/fxp1 (old) or em0/em1
export ETH_DEV="‘ifconfig |sed -e ’2,/
*
/d’ |sed -e ’s/0.
*
//’‘"
if [ -n ${ETH_DEV} -a -n "${TARGET1}" -a -n "${TARGET2}" ] ; then
echo "#!/bin/sh" > /tmp/ipfailover.sh
echo "#" >> /tmp/ipfailover.sh
echo "# This script alternates between ${ETH_DEV}0 and ${ETH_DEV}1, whenever it detects" \
>> /tmp/ipfailover.sh
echo "# a failure on the interface which is currently in use." >> /tmp/ipfailover.sh
echo "#" >> /tmp/ipfailover.sh
echo "if [ -z \"${TARGET1}\" -o -z \"${TARGET2}\" ] ; then" >> /tmp/ipfailover.sh
echo " exit 1" >> /tmp/ipfailover.sh
echo "fi" >> /tmp/ipfailover.sh
echo "" >> /tmp/ipfailover.sh
echo "ifconfig ${ETH_DEV}0 down" >> /tmp/ipfailover.sh
echo "ifconfig ${ETH_DEV}1 down" >> /tmp/ipfailover.sh
echo "export ETH0_ETHERLINE=\"\‘ifconfig ${ETH_DEV}0 | sed \\\"/ether/!d\\\"\‘\"" >> /tmp/ipfailover.sh
echo " # Note: The 2 bracketed areas in the line below each" >> /tmp/ipfailover.sh
echo " # contain one tab character and one space character." >> /tmp/ipfailover.sh
echo "export ETH0_INETLINE=\"\‘ifconfig ${ETH_DEV}0 | sed \\\"/[ ]
*
inet[ ]
*
/!d\\\" | \
sed \\\"2,\\\\\$d\\\"\‘\"" >> /tmp/ipfailover.sh
echo "ifconfig ${ETH_DEV}1 \${ETH0_ETHERLINE}" >> /tmp/ipfailover.sh
echo "ifconfig ${ETH_DEV}1 \${ETH0_INETLINE}" >> /tmp/ipfailover.sh
echo "" >> /tmp/ipfailover.sh
echo "# do forever" >> /tmp/ipfailover.sh
echo "while true ; do" >> /tmp/ipfailover.sh
echo "" >> /tmp/ipfailover.sh
echo " # echo resetting to use ${ETH_DEV}0" >> /tmp/ipfailover.sh
echo " ifconfig ${ETH_DEV}1 down" >> /tmp/ipfailover.sh
echo " ifconfig ${ETH_DEV}0 up" >> /tmp/ipfailover.sh
echo " sleep 30" >> /tmp/ipfailover.sh
echo "" >> /tmp/ipfailover.sh
echo " # stay here as long as we can ping either target" >> /tmp/ipfailover.sh
echo " while ping -n -o -t 10 ${TARGET1} > /dev/null ||" >> /tmp/ipfailover.sh
echo " ping -n -o -t 10 ${TARGET2} > /dev/null ||" >> /tmp/ipfailover.sh
echo " ping -n -o -t 10 ${TARGET1} > /dev/null ||" >> /tmp/ipfailover.sh
Protogate DC-908-3004A 33