summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/BSD/kupgrade
blob: 4d8573d44790002a39924d3d73df1c9421670d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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
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 ""
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
OpenPOWER on IntegriCloud