fix(scripts/rpm): obtain the driver version (now different from the Falco version)

Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato
2020-04-17 11:00:52 +00:00
committed by poiana
parent c241f131b8
commit 81e56067f8
3 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2019 The Falco Authors.
# Copyright (C) 2020 The Falco Authors.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
rpm_v=%{version}
mod_version=${rpm_v//_/-}
mod_version="@PROBE_VERSION@"
dkms add -m falco -v $mod_version --rpm_safe_upgrade
if [ `uname -r | grep -c "BOOT"` -eq 0 ] && [ -e /lib/modules/`uname -r`/build/include ]; then
dkms build -m falco -v $mod_version

View File

@@ -19,6 +19,6 @@ if [ $1 = 0 ]; then
/sbin/service falco stop > /dev/null 2>&1
/sbin/chkconfig --del falco
fi
rpm_v=%{version}
mod_version=${rpm_v//_/-}
mod_version="@PROBE_VERSION@"
dkms remove -m falco -v $mod_version --all --rpm_safe_upgrade