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 CONF=$(uname -v | sed 's/.*(\(.*\)).*/\1/')
11 CFILE=$ARCHDIR/conf/$CONF
17 # Copy new versions of files into /sys/net
19 for f in net/if_ppp.h net/ppp-comp.h net/ppp_defs.h $SRC/bsd-comp.c \
20 $SRC/ppp-deflate.c $SRC/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \
21 $SRC/pppcompress.c $SRC/pppcompress.h common/zlib.c common/zlib.h; do
22 dest=$SYS/net/$(basename $f)
24 if ! cmp -s $f $dest; then
25 echo "Copying $f to $dest"
26 mv -f $dest $dest.orig && echo " (old version saved in $dest.orig)"
31 echo "Copying $f to $dest"
37 # Add extra stuff to /sys/conf/files
39 if [ -f $SYS/conf/files ]; then
40 if ! grep -q ppp_tty $SYS/conf/files; then
41 echo "Patching $SYS/conf/files"
42 patch -p -N -d $SYS/conf <$SRC/files.patch
44 elif ! grep -q ppp-deflate $SYS/conf/files; then
45 echo "Patching $SYS/conf/files"
46 patch -N $SYS/conf/$OLDFILES <$SRC/files-2.2.patch
51 # Tell the user to add a pseudo-device line to the configuration file.
53 if [ -f $CFILE ]; then
54 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
56 echo "The currently-running kernel was built from configuration file"
57 echo "$CFILE, which does not include PPP."
58 echo "You need either to add a line like 'pseudo-device ppp 2' to"
59 echo "this file, or use another configuration file which includes"
60 echo "a line like this."
67 echo "You need to configure and build a new kernel."
68 echo "The procedure for doing this involves the following commands."
69 echo "(\"$CONF\" may be replaced by the name of another config file.)"
71 echo " cd $ARCHDIR/conf"
72 echo " /usr/sbin/$CONFIG $CONF"
73 echo " cd ../../compile/$CONF"
76 elif [ $DOMAKE ]; then
77 echo "You need to build a new kernel."
78 echo "The procedure for doing this involves the following commands."
80 echo " cd $SYS/compile/$CONF"
85 echo "Then copy the new kernel ($SYS/compile/$CONF/kernel) to /"
86 echo "and reboot. (Keep a copy of the old /kernel, just in case.)"