#!/bin/sh # PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH # try to bomb out fast if anything fails.... set -e argv0=`basename $0` dir=`pwd` karch=`uname -m` os=`uname -s` if [ $os = FreeBSD ] ; then rev=`uname -r` rev=`expr $rev : '\([0-9]*\)\..*'` if [ $rev = 2 ] ; then echo "Copying /usr/include/osreldate.h to /sys/sys" cp /usr/include/osreldate.h /sys/sys fi if [ -f /sys/contrib/ipfilter/netinet/mlfk_ipl.c ] ; then /bin/cp mlfk_ipl.c /sys/contrib/ipfilter/netinet/ fi fi archdir="/sys/arch/$karch" ipfdir=/sys/netinet if [ -d /sys/contrib/ipfilter ] ; then ipfdir=/sys/contrib/ipfilter/netinet fi confdir="$archdir/conf" echo -n "Installing " for i in ip_fil.[ch] fil.c ip_nat.[ch] ip_frag.[ch] ip_state.[ch] ip_proxy.[ch] ip_auth.[ch] ip_log.c ip_compat.h ipl.h ip_*_pxy.c ; do echo -n "$i " cp $i $ipfdir chmod 644 $ipfdir/$i done echo "" echo -n "Installing into /usr/include/netinet" for j in auth compat fil frag nat proxy state ; do i=ip_$j.h if [ -f "$i" ] ; then echo -n " $i" cp $i /usr/include/netinet/$i chmod 644 /usr/include/netinet/$i fi done for j in ipl.h; do if [ -f "$j" ] ; then echo -n " $j" cp $j /usr/include/netinet/$j chmod 644 /usr/include/netinet/$j fi done echo if [ -f /sys/netinet/ip_fil_compat.h ] ; then echo "Linking /sys/netinet/ip_compat.h to /sys/netinet/ip_fil_compat.h" rm /sys/netinet/ip_fil_compat.h ln -s /sys/netinet/ip_compat.h /sys/netinet/ip_fil_compat.h fi exit 0