X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=linux%2Fkinstall.sh;h=0391a231c3fca4230cb76fe793e8e3f7491f28d4;hp=1d76385a639d1c4236912f785c371dd34be8ff67;hb=d0d16c4ba18e31f76e891201e5e106887f87bbf0;hpb=fa2eb12068b947c468aec31c6a4c8ff8f7587535 diff --git a/linux/kinstall.sh b/linux/kinstall.sh index 1d76385..0391a23 100755 --- a/linux/kinstall.sh +++ b/linux/kinstall.sh @@ -14,9 +14,6 @@ # # In addition, we have to edit the Makefile in the drivers/net # directory to add support for the ppp-comp compression option. -# -# Finally, we have to check that certain include file stubs in -# /usr/include/net exist, or else pppd won't compile. Phew! LINUXSRC=/usr/src/linux @@ -82,7 +79,7 @@ bombiffailed () { # # convenience function to compare two files marked with ==FILEVERSION -# version numbers; returns success if $1 is newer than $2 +# version numbers; returns success if $1 is not older than $2 newer () { file1=$1 @@ -118,8 +115,16 @@ newer () { installfile () { BASE=`basename $1` + if [ ! -e $BASE ]; then + if [ -e ../include/linux/$BASE ]; then + BASE=../include/linux/$BASE + else + echo Could not find source file $BASE ! + false ; return + fi + fi if newer $1 $BASE; then - echo $1 is newer than $BASE, skipping + echo $1 is not older than $BASE, skipping return 0 fi BACKUP=`echo $1 | sed 's/.c$/.old.c/;s/.h$/.old.h/'` @@ -225,27 +230,27 @@ else fi echo -# -# install header stub files in /usr/include/net - -for FILE in if_ppp.h \ - if_pppvar.h \ - ppp-comp.h \ - if.h \ - ppp_defs.h - do - if [ ! -f /usr/include/net/$FILE ]; then - echo Installing stub include file in /usr/include/net/$FILE - echo "#include " > /usr/include/net/$FILE - bombiffailed - chown 0:0 /usr/include/net/$FILE - bombiffailed - chmod 444 /usr/include/net/$FILE - bombiffailed - touch /usr/include/net/$FILE - bombiffailed - fi -done +# # +# # install header stub files in /usr/include/net + +# for FILE in if_ppp.h \ +# if_pppvar.h \ +# ppp-comp.h \ +# if.h \ +# ppp_defs.h +# do +# if [ ! -f /usr/include/net/$FILE ]; then +# echo Installing stub include file in /usr/include/net/$FILE +# echo "#include " > /usr/include/net/$FILE +# bombiffailed +# chown 0:0 /usr/include/net/$FILE +# bombiffailed +# chmod 444 /usr/include/net/$FILE +# bombiffailed +# touch /usr/include/net/$FILE +# bombiffailed +# fi +# done echo "Kernel driver files installation done."