diff options
author | Roy Marples <roy@marples.name> | 2007-12-14 14:12:38 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-12-14 14:12:38 +0000 |
commit | 9f2403dffae514dca431828014a2dc9c9de4e61f (patch) | |
tree | bc1bd6ae83589f729a3bf7ca6d5ab592cbec56fd /sh.Linux/init.sh | |
parent | a3db3bac6242ff29871161620d0449125b3262aa (diff) |
Remove Gentoo copyright from all files that I know I have written
Diffstat (limited to 'sh.Linux/init.sh')
-rwxr-xr-x | sh.Linux/init.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh index 524e7538..dc9ee5d6 100755 --- a/sh.Linux/init.sh +++ b/sh.Linux/init.sh @@ -109,6 +109,24 @@ get_KV() { return $? } +KV_to_int() { + [ -z $1 ] && return 1 + + local x=${1%%-*} + local KV_MAJOR=${x%%.*} + x=${x#*.} + local KV_MINOR=${x%%.*} + x=${x#*.} + local KV_MICRO=${x%%.*} + local KV_int=$((${KV_MAJOR} * 65536 + ${KV_MINOR} * 256 + ${KV_MICRO} )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + [ "${KV_int}" -lt 131584 ] && return 1 + + echo "${KV_int}" +} + . /etc/init.d/functions.sh . "${RC_LIBDIR}"/sh/init-functions.sh . "${RC_LIBDIR}"/sh/rc-functions.sh |