blob: f90490692a0a2456504325673916d5807a276c58 [file] [log] [blame] [raw]
#!/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 =~ *fil/BSDOS ) cd ..
if ($0 =~ *kinstall) then
foreach i (ip_fil.[ch] ip_nat.[ch] ip_frag.[ch] ip_state.[ch] \
fil.c ip_compat.h ip_log.c ip_proxy.[ch] ip_ftp_pxy.c \
ip_rcmd_pxy.c ip_auth.[ch])
echo -n "$i ";
cp $i /sys/netinet
chmod 664 /sys/netinet/$i
end
echo ""
echo "Patching $archdir/$karch/ioconf.c.$karch"
cat ioconf.c.$karch.diffs | (cd $archdir/$karch; patch)
endif
echo "Patching ip_input.c and ip_output.c"
cat BSDOS/ip_{in,out}put.c.diffs | (cd /sys/netinet; patch)
if ( -f /sys/conf/files ) then
echo "Patching /sys/conf/files"
cat BSDOS/files.diffs | (cd /sys/conf; patch)
endif
set config=`/bin/ls -1t $confdir [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 "Re-config'ing $newconfig..."
if ( -f $confdir/$newconfig ) then
mv $confdir/$newconfig $confdir/$newconfig.bak
endif
if ( -d $archdir/$newconfig ) then
mv $archdir/$newconfig $archdir/$newconfig.bak
endif
if ($0 =~ *kinstall) then
awk '{print $0;if($2=="INET"){print"options IPFILTER"}}' \
$confdir/$newconfig.bak > $confdir/$newconfig
endif
echo 'You will now need to run "config" and build a new kernel.'
exit 0