summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorFrank Cusack <fcusack@fcusack.com>2003-05-25 01:46:25 +0000
committerFrank Cusack <fcusack@fcusack.com>2003-05-25 01:46:25 +0000
commite6c864185f6eb34c956e82246cfd448225e2706f (patch)
tree999cbe02cdb278b9f30df47d6a035fbc87531b46 /linux
parentb34cd4f6562185d2bbc96612bbb3dc598f3a8dcd (diff)
bail on dirs not of the form linux-x.y.z
Diffstat (limited to 'linux')
-rw-r--r--linux/mppe/mppeinstall.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/mppe/mppeinstall.sh b/linux/mppe/mppeinstall.sh
index 6a1f945..d0a57e5 100644
--- a/linux/mppe/mppeinstall.sh
+++ b/linux/mppe/mppeinstall.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
# A quickie script to install MPPE into the 2.2.19+ or 2.4.18+ kernel.
-# Does no error checking!!!
+# Does very little error checking!!!
#
mppe_files="sha1.[ch] arcfour.[ch] ppp_mppe_compress.c"
@@ -16,7 +16,7 @@ set -- ${1%/}
# strip leading /path/to/linux-
ver=`echo "${1##*/}" | sed -e 's/linux-//'` # -e 's/\/$//'
if ! expr "$ver" : 2.[24] >/dev/null ; then
- echo "Unable to determine kernel version ($ver)" >&2
+ echo "$0: Unable to determine kernel version ($ver)" >&2
exit 1
fi
@@ -28,11 +28,14 @@ if expr $ver : 2.2 >/dev/null ; then
elif expr $ver : 2.4 >/dev/null ; then
patchfiles=`echo $patchdir/linux-2.4.18-{include,make}.patch`
# need to differentiate a bit
- rel=${ver##*.}
- if [ $rel -gt 18 ] ; then
+ typeset -i rel=${ver##*.}
+ if [ $rel -eq 18 ]; then
+ patchfiles="$patchfiles $patchdir/linux-2.4.18-pad.patch"
+ elif [ $rel -gt 18 ]; then
patchfiles="$patchfiles $patchdir/linux-2.4.19-pad.patch"
else
- patchfiles="$patchfiles $patchdir/linux-2.4.18-pad.patch"
+ echo "$0: unable to determine kernel version" >&2
+ exit 1
fi
fi