1999-11-08 20:51:23 +00:00
|
|
|
#!/bin/csh -f
|
|
|
|
#
|
|
|
|
set dir=`pwd`
|
|
|
|
set karch=`uname -m`
|
|
|
|
if ( -d /sys/arch/$karch ) set archdir="/sys/arch/$karch"
|
|
|
|
if ( -d /sys/$karch ) set archdir="/sys/$karch"
|
|
|
|
set confdir="$archdir/conf"
|
|
|
|
|
|
|
|
if ( $dir =~ */FreeBSD* ) cd ..
|
|
|
|
echo -n "Installing "
|
|
|
|
foreach i (ip_fil.[ch] ip_nat.[ch] ip_frag.[ch] ip_state.[ch] fil.c \
|
2005-04-25 17:31:50 +00:00
|
|
|
ip_proxy.[ch] ip_{ftp,rcmd,raudio}_pxy.c mlf_ipl.c ipl.h \
|
1999-11-08 20:51:23 +00:00
|
|
|
ip_compat.h ip_auth.[ch] ip_log.c)
|
|
|
|
echo -n "$i ";
|
|
|
|
cp $i /sys/netinet
|
|
|
|
chmod 644 /sys/netinet/$i
|
2005-04-25 17:31:50 +00:00
|
|
|
switch ($i)
|
2002-03-19 11:45:20 +00:00
|
|
|
case *.h:
|
|
|
|
/bin/cp $i /usr/include/netinet/$i
|
|
|
|
chmod 644 /usr/include/netinet/$i
|
2005-04-25 17:31:50 +00:00
|
|
|
breaksw
|
|
|
|
endsw
|
1999-11-08 20:51:23 +00:00
|
|
|
end
|
|
|
|
echo ""
|
|
|
|
echo "Linking /usr/include/osreldate.h to /sys/sys/osreldate.h"
|
|
|
|
ln -s /usr/include/osreldate.h /sys/sys/osreldate.h
|
|
|
|
|
|
|
|
set config=`(cd $confdir; /bin/ls -1t [0-9A-Z_]*) | head -1`
|
|
|
|
echo -n "Kernel configuration to update [$config] "
|
|
|
|
set newconfig=$<
|
|
|
|
if ( "$newconfig" != "" ) then
|
|
|
|
set config="$confdir/$newconfig"
|
|
|
|
else
|
|
|
|
set newconfig=$config
|
|
|
|
endif
|
|
|
|
echo "Rewriting $newconfig..."
|
|
|
|
if ( -f $confdir/$newconfig ) then
|
|
|
|
mv $confdir/$newconfig $confdir/$newconfig.bak
|
|
|
|
endif
|
|
|
|
if ( -d $archdir/../compile/$newconfig ) then
|
|
|
|
set bak=".bak"
|
|
|
|
set dot=0
|
|
|
|
while ( -d $archdir/../compile/${newconfig}.${bak} )
|
|
|
|
set bak=".bak.$dot"
|
|
|
|
set dot=`expr 1 + $dot`
|
|
|
|
end
|
|
|
|
mv $archdir/../compile/$newconfig $archdir/../compile/${newconfig}.${bak}
|
|
|
|
endif
|
|
|
|
awk '{print $0;if($2=="INET"){print"options IPFILTER\noptions IPFILTER_LOG"}}'\
|
|
|
|
$confdir/$newconfig.bak > $confdir/$newconfig
|
|
|
|
echo "You will now need to run config on $newconfig and build a new kernel."
|
|
|
|
exit 0
|