From: Frank Terbeck Date: Sun, 16 Sep 2007 10:52:21 +0000 (+0200) Subject: lsb-functions: removed KV_to_int() X-Git-Tag: 0.3.27~20 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=e19bf541997e2181ee6cb3a458fa9138ebe9e2a3 lsb-functions: removed KV_to_int() --- diff --git a/etc/grml/lsb-functions b/etc/grml/lsb-functions index 7cddf8d..48a4604 100644 --- a/etc/grml/lsb-functions +++ b/etc/grml/lsb-functions @@ -451,29 +451,6 @@ veend() { return ${1:-0} } -# int KV_to_int(string) -# -# Convert a string type kernel version (2.4.0) to an int (132096) -# for easy compairing or versions ... -# -KV_to_int() { - [ -z "$1" ] && return 1 - - local KV_MAJOR="$(KV_major "$1")" - local KV_MINOR="$(KV_minor "$1")" - local KV_MICRO="$(KV_micro "$1")" - 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 ... - if [ "${KV_int}" -ge 131584 ] ; then - printf "${KV_int}\n" - return 0 - fi - - return 1 -} - # int get_KV() # # Return the kernel version (major, minor and micro concated) as an integer.