3 # This script modifies the kernel sources in /sys to install
4 # ppp-2.2. It is intended to be run in the ppp-2.2 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/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \
21 $SRC/pppcompress.c $SRC/pppcompress.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
27 echo " (old version saved in $dest.orig)"
32 echo "Copying $f to $dest"
38 # Add extra stuff to /sys/conf/files
40 if [ -f $SYS/conf/files ]; then
41 if ! grep -q ppp_tty $SYS/conf/files; then
42 echo "Patching $SYS/conf/files"
43 patch -p -N -d $SYS/conf <$SRC/files.patch
44 if [ $CONFIG = config ]; then
50 # Tell the user to add a pseudo-device line to the configuration file.
52 if [ -f $CFILE ]; then
53 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
55 echo "The currently-running kernel was built from configuration file"
56 echo "$CFILE, which does not include PPP."
57 echo "You need either to add a line like 'pseudo-device ppp 2' to"
58 echo "this file, or use another configuration file which includes"
59 echo "a line like this."
66 echo "You need to configure and build a new kernel."
67 echo "The procedure for doing this involves the following commands."
68 echo "(\"$CONF\" may be replaced by the name of another config file.)"
70 echo " cd $ARCHDIR/conf"
71 echo " /usr/sbin/$CONFIG $CONF"
72 echo " cd ../../compile/$CONF"
75 elif [ $DOMAKE ]; then
76 echo "You need to build a new kernel."
77 echo "The procedure for doing this involves the following commands."
79 echo " cd $SYS/compile/$CONF"
84 echo "Then copy the new kernel ($SYS/compile/$CONF/kernel) to /"
85 echo "and reboot. (Keep a copy of the old /kernel, just in case.)"