3 # This script modifies the kernel sources in /sys to install
4 # ppp-2.3. It is intended to be run in the ppp-2.3 directory.
6 # Paul Mackerras 17-Mar-95
8 # Modified to match the output of the uname command for FreeBSD 2.1.0
9 # and 2.1.5 (and perhaps later).
11 # John Lind (john@starfire.mn.org) 18-Nov-96
13 KPATH=$(uname -v | sed 's/.*://')
14 CONF=$(echo $KPATH | sed 's;.*compile/;;')
15 SYS=$(echo $KPATH | sed 's;/compile/.*$;;')
17 CFILE=$ARCHDIR/conf/$CONF
23 # Copy new versions of files into /sys/net
25 for f in net/if_ppp.h net/ppp-comp.h $SRC/ppp_defs.h $SRC/bsd-comp.c \
26 $SRC/ppp-deflate.c $SRC/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \
27 $SRC/pppcompress.c $SRC/pppcompress.h common/zlib.c common/zlib.h; do
28 dest=$SYS/net/$(basename $f)
30 if ! cmp -s $f $dest; then
31 echo "Copying $f to $dest"
32 mv -f $dest $dest.orig && echo " (old version saved in $dest.orig)"
37 echo "Copying $f to $dest"
43 # Add extra stuff to /sys/conf/files
45 if [ -f $SYS/conf/files ]; then
46 if ! grep -q ppp_tty $SYS/conf/files; then
47 echo "Patching $SYS/conf/files"
48 patch -p -N -d $SYS/conf <$SRC/files.patch
50 elif ! grep -q ppp-deflate $SYS/conf/files; then
51 echo "Patching $SYS/conf/files"
52 patch -N $SYS/conf/$OLDFILES <$SRC/files-2.2.patch
57 # Tell the user to add a pseudo-device line to the configuration file.
59 if [ -f $CFILE ]; then
60 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
62 echo "The currently-running kernel was built from configuration file"
63 echo "$CFILE, which does not include PPP."
64 echo "You need either to add a line like 'pseudo-device ppp 2' to"
65 echo "this file, or use another configuration file which includes"
66 echo "a line like this."
73 echo "You need to configure and build a new kernel."
74 echo "The procedure for doing this involves the following commands."
75 echo "(\"$CONF\" may be replaced by the name of another config file.)"
77 echo " cd $ARCHDIR/conf"
78 echo " /usr/sbin/$CONFIG $CONF"
79 echo " cd ../../compile/$CONF"
82 elif [ $DOMAKE ]; then
83 echo "You need to build a new kernel."
84 echo "The procedure for doing this involves the following commands."
91 echo "Then copy the new kernel ($KPATH/kernel) to /"
92 echo "and reboot. (Keep a copy of the old /kernel, just in case.)"