]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ipfilter/BSD/kupgrade
This commit was generated by cvs2svn to compensate for changes in r95978,
[FreeBSD/FreeBSD.git] / contrib / ipfilter / BSD / kupgrade
1 #!/bin/sh
2 #
3 PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH
4  
5 # try to bomb out fast if anything fails....
6 set -e
7  
8 argv0=`basename $0`
9 dir=`pwd`
10 karch=`uname -m`
11 os=`uname -s`
12 if [ $os = FreeBSD ] ; then
13         rev=`uname -r`
14         rev=`expr $rev : '\([0-9]*\)\..*'`
15         if [ $rev = 2 ] ; then
16                 echo "Copying /usr/include/osreldate.h to /sys/sys"
17                 cp /usr/include/osreldate.h /sys/sys
18         fi
19 fi
20 archdir="/sys/arch/$karch"
21 ipfdir=/sys/netinet
22 if [ -d /sys/contrib/ipfilter ] ; then
23         ipfdir=/sys/contrib/ipfilter/netinet
24 fi
25 confdir="$archdir/conf"
26  
27 echo -n "Installing "
28 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
29         echo -n "$i "
30         cp $i $ipfdir
31         chmod 644 $ipfdir/$i
32 done
33 echo ""
34 if [ -f /sys/netinet/ip_fil_compat.h ] ; then
35         echo "Linking /sys/netinet/ip_compat.h to /sys/netinet/ip_fil_compat.h"
36         rm /sys/netinet/ip_fil_compat.h
37         ln -s /sys/netinet/ip_compat.h /sys/netinet/ip_fil_compat.h
38 fi
39 exit 0