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
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 include
/net
/if_ppp.h include
/net
/ppp-comp.h include
/net
/ppp_defs.h \
27 $SRC/bsd-comp.c
$SRC/ppp-deflate.c \
28 $SRC/if_ppp.c
$SRC/if_pppvar.h
$SRC/ppp_tty.c \
29 $SRC/slcompress.c
$SRC/slcompress.h common
/zlib.c common
/zlib.h
; do
30 dest
=$SYS/net
/$
(basename $f)
32 if ! diff -qBI '[ ]\$[IN][de].*:.*\$' $f $dest >/dev
/null
; then
33 echo "Copying $f to $dest"
34 mv -f $dest $dest.orig
&& echo " (old version saved in $dest.orig)"
39 echo "Copying $f to $dest"
45 OLDFILES
=files.oldconf
50 if [ -f $SYS/conf
/$OLDFILES ]; then
51 if ! grep -q ppp-deflate
$SYS/conf
/$OLDFILES; then
52 echo "Patching $SYS/conf/$OLDFILES"
53 patch -N $SYS/conf
/$OLDFILES <$SRC/files.oldconf.
patch
54 if [ $CONFIG = $OLDCONFIG ]; then
59 if [ -f $SYS/conf
/$NEWFILES ]; then
60 if ! grep -q ppp-deflate
$SYS/conf
/$NEWFILES; then
61 echo "Patching $SYS/conf/$NEWFILES"
62 patch -N $SYS/conf
/$NEWFILES <$SRC/files.
patch
63 if [ $CONFIG = $NEWCONFIG ]; then
69 # Tell the user to add a pseudo-device line to the configuration file
70 # and remake the kernel, if necessary.
72 if [ -f $CFILE ]; then
73 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
75 echo "The currently-running kernel was built from configuration file"
76 echo "$CFILE, which does not include PPP."
77 echo "You need either to add a line like 'pseudo-device ppp 2' to"
78 echo "this file, or use another configuration file which includes"
79 echo "a line like this."
86 echo "You need to configure and build a new kernel."
87 echo "The procedure for doing this involves the following commands:"
88 echo "(\"$CONF\" may be replaced by the name of another config file.)"
90 echo " cd $ARCHDIR/conf"
91 echo " /usr/sbin/$CONFIG $CONF"
92 echo " cd ../compile/$CONF"
95 elif [ $DOMAKE ]; then
97 echo "You need to build a new kernel."
98 echo "The procedure for doing this involves the following commands:"
100 echo " cd $ARCHDIR/compile/$CONF"
105 echo "Then copy the new kernel ($ARCHDIR/compile/$CONF/netbsd)"
106 echo "to /netbsd and reboot. (Keep a copy of the old /netbsd,"
107 echo "just in case.)"