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 11-Dec-95
9 CONF=$(uname -v | sed 's/.*(\(.*\)).*/\1/')
11 ARCHDIR=$SYS/arch/$ARCH
12 CFILE=$ARCHDIR/conf/$CONF
18 # Copy new versions of files into /sys/net
20 for f in net/if_ppp.h net/ppp-comp.h net/ppp_defs.h $SRC/bsd-comp.c \
21 $SRC/ppp-deflate.c $SRC/if_ppp.c $SRC/if_pppvar.h $SRC/ppp_tty.c \
22 $SRC/slcompress.c $SRC/slcompress.h common/zlib.c common/zlib.h; do
23 dest=$SYS/net/$(basename $f)
25 if ! diff -qBI '[ ]\$[IN][de].*:.*\$' $f $dest >/dev/null; then
26 echo "Copying $f to $dest"
27 mv -f $dest $dest.orig && echo " (old version saved in $dest.orig)"
32 echo "Copying $f to $dest"
38 # Tell the user to add a pseudo-device line to the configuration file
39 # and remake the kernel, if necessary.
41 if [ -f $CFILE ]; then
42 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
44 echo "The currently-running kernel was built from configuration file"
45 echo "$CFILE, which does not include PPP."
46 echo "You need either to add a line like 'pseudo-device ppp 2' to"
47 echo "this file, or use another configuration file which includes"
48 echo "a line like this."
55 echo "You need to configure and build a new kernel."
56 echo "The procedure for doing this involves the following commands:"
57 echo "(\"$CONF\" may be replaced by the name of another config file.)"
59 echo " cd $ARCHDIR/conf"
60 echo " /usr/sbin/$CONFIG $CONF"
61 echo " cd ../compile/$CONF"
64 elif [ $DOMAKE ]; then
66 echo "You need to build a new kernel."
67 echo "The procedure for doing this involves the following commands:"
69 echo " cd $ARCHDIR/compile/$CONF"
74 echo "Then copy the new kernel ($ARCHDIR/compile/$CONF/netbsd)"
75 echo "to /netbsd and reboot. (Keep a copy of the old /netbsd,"