| #!/bin/sh |
| # |
| PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH |
| argv0=`basename $0` |
| |
| case `pwd` in |
| *BSD) |
| ;; |
| *) |
| cd BSD |
| ;; |
| esac |
| os=`uname -s` |
| rev=`uname -r` |
| maj=`expr $rev : '\([0-9]*\)\.'` |
| min=`expr $rev : '[0-9]*\.\([0-9]*\)'` |
| sub=`expr $rev : '[0-9]*\.[0-9]*\.\([0-9]*\)'` |
| plat=`uname -p` |
| objdir=${os}-${rev}-${plat} |
| |
| # try to bomb out fast if anything fails.... |
| set -e |
| |
| for i in ipf ipfstat ipmon ipnat ippool; do |
| if [ ! -f /sbin/${i}.dist ] ; then |
| mv /sbin/${i} /sbin/${i}.dist |
| cp -p /sbin/${i}.dist /sbin/${i} |
| fi |
| cp ${objdir}/${i} /sbin/ |
| done |
| if [ -f /boot/kernel/ipl.ko ] ; then |
| if [ ! -f /boot/kernel/ipl.ko.dist ] ; then |
| mv /boot/kernel/ipl.ko /boot/kernel/ipl.ko.dist |
| cp -p /boot/kernel/ipl.ko.dist /boot/kernel/ipl.ko |
| fi |
| if [ ! -f /boot/kernel/ipl.ko.symbols.dist ] ; then |
| mv /boot/kernel/ipl.ko.symbols /boot/kernel/ipl.ko.symbols.dist |
| fi |
| cp ${objdir}/ipf.ko /boot/kernel/ipl.ko |
| fi |
| exit 0 |