| #!/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 -a -f /sbin/${i} ] ; then |
| mv /sbin/${i} /sbin/${i}.dist |
| cp -p /sbin/${i}.dist /sbin/${i} |
| cp ${objdir}/${i} /sbin/ |
| fi |
| if [ ! -f /usr/sbin/${i}.dist -a -f /usr/sbin/${i} ] ; then |
| mv /usr/sbin/${i} /usr/sbin/${i}.dist |
| cp -p /usr/sbin/${i}.dist /usr/sbin/${i} |
| cp ${objdir}/${i} /usr/sbin/ |
| fi |
| 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 |