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 11-Dec-95
9 CONF=$(uname -v | sed 's/.*(\(.*\)).*/\1/')
11 ARCHDIR=$SYS/arch/$ARCH
12 CFILE=$ARCHDIR/conf/$CONF
17 # Work out whether to use config or config.old
18 if grep -q timezone $CFILE; then
24 # Copy new versions of files into /sys/net
26 for f in net/if_ppp.h net/ppp-comp.h net/ppp_defs.h $SRC/bsd-comp.c \
27 $SRC/ppp-deflate.c $SRC/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \
28 $SRC/slcompress.c $SRC/slcompress.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
34 echo " (old version saved in $dest.orig)"
39 echo "Copying $f to $dest"
45 # Tell the user to add a pseudo-device line to the configuration file
46 # and remake the kernel, if necessary.
48 if [ -f $CFILE ]; then
49 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
51 echo "The currently-running kernel was built from configuration file"
52 echo "$CFILE, which does not include PPP."
53 echo "You need either to add a line like 'pseudo-device ppp 2' to"
54 echo "this file, or use another configuration file which includes"
55 echo "a line like this."
62 echo "You need to configure and build a new kernel."
63 echo "The procedure for doing this involves the following commands."
64 echo "(\"$CONF\" may be replaced by the name of another config file.)"
66 echo " cd $ARCHDIR/conf"
67 echo " /usr/sbin/$CONFIG $CONF"
68 echo " cd ../compile/$CONF"
71 elif [ $DOMAKE ]; then
72 echo "You need to build a new kernel."
73 echo "The procedure for doing this involves the following commands."
75 echo " cd $ARCHDIR/compile/$CONF"
80 echo "Then copy the new kernel ($ARCHDIR/compile/$CONF/netbsd)"
81 echo "to /netbsd and reboot. (Keep a copy of the old /netbsd,"