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/netisr.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 # Add in patch to call PPP software interrupt routine.
54 if [ -f $ARCHDIR/$d/$p ]; then
55 if ! grep -q NETISR_PPP $ARCHDIR/$d/$p; then
56 echo "Patching $ARCHDIR/$d/$p"
57 patch -p -N -d $ARCHDIR/$d < $SRC/$p.patch
62 # Tell the user to add a pseudo-device line to the configuration file.
64 if [ -f $CFILE ]; then
65 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
67 echo "The currently-running kernel was built from configuration file"
68 echo "$CFILE, which does not include PPP."
69 echo "You need either to add a line like 'pseudo-device ppp 2' to"
70 echo "this file, or use another configuration file which includes"
71 echo "a line like this."
78 echo "You need to configure and build a new kernel."
79 echo "The procedure for doing this involves the following commands."
80 echo "(\"$CONF\" may be replaced by the name of another config file.)"
82 echo " cd $ARCHDIR/conf"
83 echo " /usr/sbin/$CONFIG $CONF"
84 echo " cd ../compile/$CONF"
86 elif [ $DOMAKE ]; then
87 echo "You need to build a new kernel."
88 echo "The procedure for doing this involves the following commands."
90 echo " cd $ARCHDIR/compile/$CONF"
95 echo "Then copy the new kernel ($ARCHDIR/compile/$CONF/freebsd)"
96 echo "to /freebsd and reboot. (Keep a copy of the old /freebsd,"