Home | History | Annotate | Download | only in addons
      1 #!/bin/bash
      2 
      3 kvers=$(uname -r)
      4 
      5 MAJOR=$(echo $kvers | awk -F. '{ print $1 }')
      6 MINOR=$(echo $kvers | awk -F. '{ print $2 }')
      7 SUBVR=$(echo $kvers | awk -F. '{ print $3 }' | awk -F- '{ print $1 }' | sed 's/[^0-9]*//g')
      8 
      9 maj_num=$(($MAJOR * 65536))
     10 min_num=$(($MINOR * 256))
     11 
     12 echo $(($maj_num + $min_num + $SUBVR))
     13