[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Asserting kernel version



I want to release a new bind package today.

The last change I need to make is to assert the version of the kernel from
postinst rather than using any kind of dependency (or reverse dependency) from
the control file. What is the best way to do this?

Here's what I've come up with:

    set -- `uname -r | sed 's/\./ /g'`
    if [ `expr $1 '*' 100000 + $2 '*' 1000 + $3` -lt 103056 ]
    then
      echo "BIND requires kernel 1.3.56 or later" >&2
      exit 1
    fi

Is this acceptable? What would be better?

Thanks,

-- 
Robert Leslie
rob@mars.org



Reply to: