Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/ipf Handle syssrc/sys/netinet and syssrc/sys/lkm/netine...



details:   https://anonhg.NetBSD.org/src/rev/35cb44202789
branches:  trunk
changeset: 481541:35cb44202789
user:      veego <veego%NetBSD.org@localhost>
date:      Tue Feb 01 20:05:54 2000 +0000

description:
Handle syssrc/sys/netinet and syssrc/sys/lkm/netinet/if_ipl

diffstat:

 dist/ipf/ipf2netbsd |  38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diffs (110 lines):

diff -r f6b029de0a31 -r 35cb44202789 dist/ipf/ipf2netbsd
--- a/dist/ipf/ipf2netbsd       Tue Feb 01 19:37:58 2000 +0000
+++ b/dist/ipf/ipf2netbsd       Tue Feb 01 20:05:54 2000 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#      $NetBSD: ipf2netbsd,v 1.1 1999/12/11 22:08:02 veego Exp $
+#      $NetBSD: ipf2netbsd,v 1.2 2000/02/01 20:05:54 veego Exp $
 #
 # Copyright (c) 1999 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,22 +33,26 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-# ipf2netbsd:  convert a ipf source tree into a
-# netbsd ipf source tree, under basesrc/dist,
+# ipf2netbsd:  convert a ipf source tree into a netbsd ipf source tree,
+# under basesrc/dist/ipf, syssrc/sys/netinet and syssrc/sys/lkm/netinet/if_ipl
 
 if [ $# -ne 2 ]; then echo "ipf2netbsd src dest"; exit 1; fi
 
 r=$1
-d=$2/basesrc/dist/ipf
+dest=$2
 
-case "$d" in
+case "$dest" in
        /*)
                ;;
        *)
-               d=`/bin/pwd`/$d
+               dest=`/bin/pwd`/$dest
                ;;
 esac
 
+dbase=$dest/basesrc/dist/ipf
+dsys=$dest/syssrc/sys/netinet
+dlkm=$dest/syssrc/sys/lkm/netinet/if_ipl
+
 case "$r" in
        /*)
                ;;
@@ -57,22 +61,24 @@
                ;;
 esac
 
-echo preparing directory $d
-rm -rf $d
+echo preparing directory $dbase, $dsys and $dlkm
+rm -rf $dbase $dsys $dlkm
 
 ### Copy the files and directories
-mkdir -p $d
+mkdir -p $dbase $dsys $dlkm
 cd $r
-pax -rvw . $d
+pax -rvw . $dbase
+pax -rvw fil.c ip_auth.c ip_auth.h ip_compat.h ip_fil.c ip_fil.h ip_frag.c ip_frag.h ip_ftp_pxy.c ip_log.c ip_nat.c ip_nat.h ip_proxy.c ip_proxy.h ip_raudio_pxy.c ip_rcmd_pxy.c ip_state.c ip_state.h 
ipl.h $dsys
+pax -rvw mln_ipl.c $dlkm
 
 ### Remove the $'s around the Id:
-find $d -type f -print | while read f; do
+find $dest -type f -print | while read f; do
        sed -e ' s/\$\(Id.*\) \$/\1/' < $f > /tmp/ipf2f$$ && mv /tmp/ipf2f$$ $f && \
        echo removed \$Id tag from $f
 done
 
 ### Add our NetBSD RCS Id
-find $d -name '*.[chly]' -print | while read c; do
+find $dest -name '*.[chly]' -print | while read c; do
        sed 1q < $c | grep -q '\$NetBSD' || (
 echo "/*       \$NetBSD\$      */" >/tmp/ipf2n$$
 echo "" >>/tmp/ipf2n$$
@@ -81,7 +87,7 @@
        )
 done
 
-find $d -name '*.[0-9]' -a \! -name 'example.*' -print | while read m; do
+find $dest -name '*.[0-9]' -a \! -name 'example.*' -print | while read m; do
        sed 1q < $m | grep -q '\$NetBSD' || (
 echo ".\\\"    \$NetBSD\$" >/tmp/ipf2m$$
 echo ".\\\"" >>/tmp/ipf2m$$
@@ -90,7 +96,7 @@
        )
 done
 
-find $d -name 'example.*' -print | while read e; do
+find $dest -name 'example.*' -print | while read e; do
        sed 1q < $e | grep -q '\$NetBSD' || (
 echo "#        \$NetBSD\$" >/tmp/ipf2e$$
        cat $e >> /tmp/ipf2e$$
@@ -103,7 +109,7 @@
 ### Clean up any CVS directories that might be around.
 echo "cleaning up CVS residue."
 (
-       cd $d
+       cd $dest
        find . -type d -name "CVS" -print | xargs rm -r
 )
 echo done
@@ -111,7 +117,7 @@
 ### Fixing file and directory permissions.
 echo "Fixing file/directory permissions."
 (
-       cd $d
+       cd $dest
        find . -type f -print | xargs chmod u+rw,go+r
        find . -type d -print | xargs chmod u+rwx,go+rx
 )



Home | Main Index | Thread Index | Old Index