diff options
Diffstat (limited to 'addons/bashrc.common')
-rw-r--r-- | addons/bashrc.common | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/bashrc.common b/addons/bashrc.common index f357b6f..14e09d3 100644 --- a/addons/bashrc.common +++ b/addons/bashrc.common @@ -17,6 +17,16 @@ if [ -d /kernel-headers/ ]; then if [ $this_vers -eq $h_vers ]; then override_vers=0 + else + this_major=$(($this_vers / (256 * 256))) + this_minor=$(($this_vers / 256 % 256)) + h_major=$(($h_vers / (256 * 256))) + h_minor=$(($h_vers / 256 % 256)) + if [ $this_major -ne $h_major ] || [ $this_minor -ne $h_minor ]; then + echo "Error: kernel version does not match installed headers ($this_major.$this_minor <> $h_major.$h_minor)" + echo "BCC will not work" + override_vers=0 + fi fi fi |