diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-06-14 13:00:06 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-06-14 13:00:06 +0200 |
commit | 5506bd661d4f05aa79df8d00ef7972a746374540 (patch) | |
tree | e335aab464a7e729f49326316317686168923499 | |
parent | 98dd5ad4150c0608a7da9748dc76c08a021f23b9 (diff) | |
download | sbotools2-5506bd661d4f05aa79df8d00ef7972a746374540.tar.xz |
#43 - kernel version strings can include "-", so replace it with "_"
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 1041aa8..410f28a 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -578,6 +578,7 @@ sub version_cmp { my ($v1, $v2) = @_; my $kv = `uname -r`; chomp $kv; + $kv =~ s/-/_/g; if ($v1 =~ /(.+)_\Q$kv\E$/) { $v1 = $1 } if ($v2 =~ /(.+)_\Q$kv\E$/) { $v2 = $1 } |