X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=freebsd-2.0%2Fkinstall.sh;h=0310677700f62a56be42b0b6ad62fc905d2d7e71;hp=488296e7ffd3fec7530702eca187d427a2b813b8;hb=7a4dc0ff500aaa176a41965d8d4ad15a97a70904;hpb=9de44646b47a237664d4e992d10f2e2a69dcb2a7 diff --git a/freebsd-2.0/kinstall.sh b/freebsd-2.0/kinstall.sh index 488296e..0310677 100755 --- a/freebsd-2.0/kinstall.sh +++ b/freebsd-2.0/kinstall.sh @@ -1,12 +1,18 @@ #!/bin/sh # This script modifies the kernel sources in /sys to install -# ppp-2.2. It is intended to be run in the ppp-2.2 directory. +# ppp-2.3. It is intended to be run in the ppp-2.3 directory. # # Paul Mackerras 17-Mar-95 +# +# Modified to match the output of the uname command for FreeBSD 2.1.0 +# and 2.1.5 (and perhaps later). +# +# John Lind (john@starfire.mn.org) 18-Nov-96 -CONF=$(uname -v | sed 's/.*(\(.*\)).*/\1/') -SYS=/sys +KPATH=$(uname -v | sed 's/.*://') +CONF=$(echo $KPATH | sed 's;.*compile/;;') +SYS=$(echo $KPATH | sed 's;/compile/.*$;;') ARCHDIR=$SYS/i386 CFILE=$ARCHDIR/conf/$CONF SRC=freebsd-2.0 @@ -16,15 +22,15 @@ CONFIG=config # Copy new versions of files into /sys/net -for f in net/if_ppp.h net/ppp-comp.h net/ppp_defs.h $SRC/bsd-comp.c \ +for f in include/net/if_ppp.h include/net/ppp-comp.h \ + $SRC/ppp_defs.h $SRC/bsd-comp.c $SRC/ppp-deflate.c \ $SRC/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \ - $SRC/pppcompress.c $SRC/pppcompress.h; do + $SRC/pppcompress.c $SRC/pppcompress.h common/zlib.c common/zlib.h; do dest=$SYS/net/$(basename $f) if [ -f $dest ]; then if ! cmp -s $f $dest; then echo "Copying $f to $dest" - mv -f $dest $dest.orig - echo " (old version saved in $dest.orig)" + mv -f $dest $dest.orig && echo " (old version saved in $dest.orig)" cp $f $dest DOMAKE=yes fi @@ -41,9 +47,11 @@ if [ -f $SYS/conf/files ]; then if ! grep -q ppp_tty $SYS/conf/files; then echo "Patching $SYS/conf/files" patch -p -N -d $SYS/conf <$SRC/files.patch - if [ $CONFIG = config ]; then - DOCONF=yes - fi + DOCONF=yes + elif ! grep -q ppp-deflate $SYS/conf/files; then + echo "Patching $SYS/conf/files" + patch -N $SYS/conf/$OLDFILES <$SRC/files-2.2.patch + DOCONF=yes fi fi @@ -70,16 +78,17 @@ if [ $DOCONF ]; then echo " cd $ARCHDIR/conf" echo " /usr/sbin/$CONFIG $CONF" echo " cd ../../compile/$CONF" + echo " make depend" DOMAKE=yes elif [ $DOMAKE ]; then echo "You need to build a new kernel." echo "The procedure for doing this involves the following commands." echo - echo " cd $SYS/compile/$CONF" + echo " cd $KPATH" fi if [ $DOMAKE ]; then echo " make" echo - echo "Then copy the new kernel ($SYS/compile/$CONF/kernel) to /" + echo "Then copy the new kernel ($KPATH/kernel) to /" echo "and reboot. (Keep a copy of the old /kernel, just in case.)" fi