X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=linux%2Fkinstall.sh;h=1d76385a639d1c4236912f785c371dd34be8ff67;hp=de263513464199cd64979d307b463ec9c7ed668e;hb=b5c0cf380b11e37f580e6f2affcb78d5ccedade0;hpb=6589bd3bbe86761cc41767a1400a69bbc985788a diff --git a/linux/kinstall.sh b/linux/kinstall.sh index de26351..1d76385 100755 --- a/linux/kinstall.sh +++ b/linux/kinstall.sh @@ -48,7 +48,7 @@ fi # introduced in 1.0.1 if [ `egrep '^VERSION|^PATCHLEVEL|^SUBLEVEL' $LINUXMK | wc -l` -ne 3 ]; then echo You appear to have a very old kernel. You must upgrade. - echo It is recommended that you upgrade to the most recent 1.2.X kernel. + echo It is recommended that you upgrade to the most recent 2.0.x kernel. exit 1 fi @@ -62,36 +62,13 @@ KERNEL=$VERSION.$PATCHLEVEL.$SUBLEVEL # # Pass judgement on the kernel version -if [ $VERSION -eq 1 ]; then - if [ $PATCHLEVEL -eq 0 -o $PATCHLEVEL -eq 1 -a $SUBLEVEL -lt 14 ]; then +if [ $VERSION -lt 2 ]; then echo You appear to be running $KERNEL. There is no support for - echo kernels predating 1.1.14. It is recommended that you upgrade - echo to the most recent 1.2.X kernel. + echo kernels predating 2.0.0. It is recommended that you upgrade + echo to the most recent 2.0.x kernel. exit 1 - fi - if [ $PATCHLEVEL -eq 1 ]; then - echo You appear to be running $KERNEL. It is recommended that you - echo upgrade to the most recent 1.2.X kernel. - echo However, installation will proceed. - fi fi -echo -echo Installing into kernel version $KERNEL in $LINUXSRC -echo - -echo "Notice to the user:" -echo -echo "It is perfectly legal for this script to run without making any changes" -echo "to your system. This only means that the system currently contains the" -echo "necessary changes to support this package. Please do not attempt to" -echo "force this script to replace any file or make any patch. If you do so" -echo "then it is probable that you are actually putting older, buggier, code" -echo "over newer, fixed, code. Thank you." -echo -echo Installing into kernel version $KERNEL in $LINUXSRC -echo - # # convenience function to exit if the last command failed @@ -136,18 +113,6 @@ newer () { false ; return } -# -# Change the USE_SKB_PROTOCOL for correct operation on 1.3.x -update_ppp () { - mv $LINUXSRC/drivers/net/ppp.c $LINUXSRC/drivers/net/ppp.c.in - if [ "$VERSION.$PATCHLEVEL" = "1.3" ]; then - sed 's/#define USE_SKB_PROTOCOL 0/#define USE_SKB_PROTOCOL 1/' <$LINUXSRC/drivers/net/ppp.c.in >$LINUXSRC/drivers/net/ppp.c - else - sed 's/#define USE_SKB_PROTOCOL 1/#define USE_SKB_PROTOCOL 0/' <$LINUXSRC/drivers/net/ppp.c.in >$LINUXSRC/drivers/net/ppp.c - fi - rm $LINUXSRC/drivers/net/ppp.c.in -} - # # Install the files. @@ -168,37 +133,6 @@ installfile () { bombiffailed touch $1 bombiffailed - if [ "$2" = "yes" ]; then - update_ppp - fi -} - -# -# Patch the bad copies of the sys/types.h file -# -patch_include () { - echo -n "Ensuring that sys/types.h includes sys/bitypes.h" - fgrep "" /usr/include/sys/types.h >/dev/null - if [ ! "$?" = "0" ]; then - echo -n '.' - rm -f /usr/include/sys/types.h.rej - (cd /usr/include/sys; patch -p0 -f -F30 -s) after it includes the file." - echo -n "Please change it so that it does." - rm -f /usr/include/sys/types.h.rej - else - echo -n " -- completed" - fi - else - echo -n " -- skipping" - fi - echo "" } # @@ -254,57 +188,21 @@ done installfile $LINUXSRC/drivers/net/ppp.c yes -for FILE in if.h if_arp.h route.h - do - if [ ! -f $LINUXSRC/include/linux/$FILE ]; then - echo Installing new $1 - cp $FILE $LINUXSRC/include/linux/$FILE - bombiffailed - touch $LINUXSRC/include/linux/$FILE - bombiffailed - fi -done - echo -n 'Adding BSD compression module to drivers makefile...' NETMK=$LINUXSRC/drivers/net/Makefile fgrep bsd_comp.o $NETMK >/dev/null if [ ! "$?" = "0" ]; then - echo -n '.' - rm -f $NETMK.orig $NETMK.rej - if [ "$VERSION.$PATCHLEVEL" = "1.2" ]; then - (cd $LINUXSRC; patch -p1 -f -F30 -s) $NETMK.temp - bombiffailed - echo -n '.' - mv $NETMK $NETMK.orig - bombiffailed - echo -n '.' - mv $NETMK.temp $NETMK - bombiffailed - fi -# if [ -f $NETMK.orig ]; then - mv $NETMK.orig $NETMK.old + mv $NETMK.orig $NETMK fi + sed 's/ppp.o$/ppp.o bsd_comp.o/g' <$NETMK >$NETMK.temp + bombiffailed + echo -n '.' + mv $NETMK $NETMK.orig + bombiffailed + echo -n '.' + mv $NETMK.temp $NETMK + bombiffailed else echo -n '(already there--skipping)' fi @@ -334,8 +232,6 @@ for FILE in if_ppp.h \ if_pppvar.h \ ppp-comp.h \ if.h \ - if_arp.h \ - route.h \ ppp_defs.h do if [ ! -f /usr/include/net/$FILE ]; then @@ -351,36 +247,6 @@ for FILE in if_ppp.h \ fi done -for FILE in ip.h \ - tcp.h - do - if [ ! -f /usr/include/netinet/$FILE ]; then - echo Installing stub include file in /usr/include/netinet/$FILE - if [ ! -f $LINUXSRC/include/linux/$FILE ]; then - echo "#include \"$LINUXSRC/net/inet/$FILE\"" >/usr/include/netinet/$FILE - else - echo "#include " > /usr/include/netinet/$FILE - fi - chown 0:0 /usr/include/netinet/$FILE - bombiffailed - chmod 444 /usr/include/netinet/$FILE - bombiffailed - touch /usr/include/netinet/$FILE - bombiffailed - fi -done - -patch_include - echo "Kernel driver files installation done." -if [ "$VERSION.$PATCHLEVEL" = "1.2" ]; then - echo - echo "Please make sure that you apply the kernel patches in the" - echo "linux/Other.Patches directory. You should apply both the 1.2.13 and" - echo "slhc.patch files or the driver in the kernel may not compile." - echo "The instructions are in each of these files and the README.Linux" - echo "document." -fi - exit 0