Log a message when we succeed or fail in authenticating ourselves
[mpls-ppp.git] / netbsd-1.2 / kinstall.sh
blobf407c3f0dc98615fc9047d87bd6cff37dbd0b609
1 #!/bin/sh
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
8 ARCH=$(uname -m)
9 CONF=$(uname -v | sed 's/.*(\(.*\)).*/\1/')
10 SYS=/sys
11 ARCHDIR=$SYS/arch/$ARCH
12 CFILE=$ARCHDIR/conf/$CONF
13 SRC=netbsd-1.2
14 DOCONF=
15 DOMAKE=
16 CONFIG=config
18 # Copy new versions of files into /sys/net
20 for f in include/net/if_ppp.h include/net/ppp-comp.h include/net/ppp_defs.h \
21 $SRC/bsd-comp.c $SRC/ppp-deflate.c $SRC/if_ppp.c $SRC/if_pppvar.h \
22 $SRC/ppp_tty.c $SRC/slcompress.c $SRC/slcompress.h \
23 common/zlib.c common/zlib.h; do
24 dest=$SYS/net/$(basename $f)
25 if [ -f $dest ]; then
26 if ! diff -qBI '[ ]\$[IN][de].*:.*\$' $f $dest >/dev/null; then
27 echo "Copying $f to $dest"
28 mv -f $dest $dest.orig && echo " (old version saved in $dest.orig)"
29 cp $f $dest
30 DOMAKE=yes
32 else
33 echo "Copying $f to $dest"
34 cp $f $dest
35 DOMAKE=yes
37 done
39 # Tell the user to add a pseudo-device line to the configuration file
40 # and remake the kernel, if necessary.
42 if [ -f $CFILE ]; then
43 if ! grep -q '^[ ]*pseudo-device[ ][ ]*ppp' $CFILE; then
44 echo
45 echo "The currently-running kernel was built from configuration file"
46 echo "$CFILE, which does not include PPP."
47 echo "You need either to add a line like 'pseudo-device ppp 2' to"
48 echo "this file, or use another configuration file which includes"
49 echo "a line like this."
50 DOCONF=yes
54 if [ $DOCONF ]; then
55 echo
56 echo "You need to configure and build a new kernel."
57 echo "The procedure for doing this involves the following commands:"
58 echo "(\"$CONF\" may be replaced by the name of another config file.)"
59 echo
60 echo " cd $ARCHDIR/conf"
61 echo " /usr/sbin/$CONFIG $CONF"
62 echo " cd ../compile/$CONF"
63 echo " make depend"
64 DOMAKE=yes
65 elif [ $DOMAKE ]; then
66 echo
67 echo "You need to build a new kernel."
68 echo "The procedure for doing this involves the following commands:"
69 echo
70 echo " cd $ARCHDIR/compile/$CONF"
72 if [ $DOMAKE ]; then
73 echo " make"
74 echo
75 echo "Then copy the new kernel ($ARCHDIR/compile/$CONF/netbsd)"
76 echo "to /netbsd and reboot. (Keep a copy of the old /netbsd,"
77 echo "just in case.)"