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 include/net/if_ppp.h include/net/ppp-comp.h \
26 $SRC/ppp_defs.h $SRC/bsd-comp.c $SRC/ppp-deflate.c \
27 $SRC/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \
28 $SRC/pppcompress.c $SRC/pppcompress.h common/zlib.c common/zlib.h; do
29 dest=$SYS/net/$(basename $f)
31 if ! cmp -s $f $dest; then
32 echo "Copying $f to $dest"
33 mv -f $dest $dest.orig && echo " (old version saved in $dest.orig)"
38 echo "Copying $f to $dest"
44 # Add extra stuff to /sys/conf/files
46 if [ -f $SYS/conf/files ]; then
47 if ! grep -q ppp_tty $SYS/conf/files; then
48 echo "Patching $SYS/conf/files"
49 patch -p -N -d $SYS/conf <$SRC/files.patch
51 elif ! grep -q ppp-deflate $SYS/conf/files; then
52 echo "Patching $SYS/conf/files"
53 patch -N $SYS/conf/$OLDFILES <$SRC/files-2.2.patch
58 # Tell the user to add a pseudo-device line to the configuration file.
60 if [ -f $CFILE ]; then
61 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
63 echo "The currently-running kernel was built from configuration file"
64 echo "$CFILE, which does not include PPP."
65 echo "You need either to add a line like 'pseudo-device ppp 2' to"
66 echo "this file, or use another configuration file which includes"
67 echo "a line like this."
74 echo "You need to configure and build a new kernel."
75 echo "The procedure for doing this involves the following commands."
76 echo "(\"$CONF\" may be replaced by the name of another config file.)"
78 echo " cd $ARCHDIR/conf"
79 echo " /usr/sbin/$CONFIG $CONF"
80 echo " cd ../../compile/$CONF"
83 elif [ $DOMAKE ]; then
84 echo "You need to build a new kernel."
85 echo "The procedure for doing this involves the following commands."
92 echo "Then copy the new kernel ($KPATH/kernel) to /"
93 echo "and reboot. (Keep a copy of the old /kernel, just in case.)"