Skip to content

Commit

Permalink
FEATURES=SONIC include DROPMON when kernel > 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Nov 16, 2022
1 parent 2e6741c commit 7f233a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hsflowd.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: host sFlow daemon
Name: hsflowd
Version: 2.0.39
Release: 7
Release: 8
License: http://sflow.net/license.html
Group: Applications/Internet
URL: http://sflow.net
Expand Down
7 changes: 7 additions & 0 deletions src/Linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ifndef REDHAT
REDHAT=$(shell if [ -r /etc/redhat-release ]; then echo "yes"; else echo "no"; fi)
endif

# learn kernel version
KVER=$(shell ./kernelVersion.sh)
KERNEL5PLUS=$(shell if test $(KVER) -gt 5000000; then echo "yes"; else echo "no"; fi)

HSFLOWD_CONF=scripts/hsflowd.conf
HSFLOWD_INITSCRIPT=scripts/hsflowd
HSFLOWD_SYSTEMD_SERVICE=scripts/hsflowd.service
Expand Down Expand Up @@ -43,6 +47,9 @@ FEATURES_EOS= EAPI
FEATURES_OS10= OS10 DBUS SYSTEMD
FEATURES_OPX= OPX DBUS SYSTEMD
FEATURES_SONIC= SONIC PSAMPLE DOCKER
ifeq ($(KERNEL5PLUS),yes)
FEATURES_SONIC += DROPMON
endif
FEATURES_XEN= XEN OVS
FEATURES_HOST= NFLOG PCAP TCP DOCKER KVM OVS DBUS SYSTEMD PSAMPLE DENT DROPMON

Expand Down
2 changes: 2 additions & 0 deletions src/Linux/kernelVersion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
uname -r | awk -F '\\.' -- '{ print ($1 * 1000000) + ($2 * 1000) + $3;}'

0 comments on commit 7f233a1

Please sign in to comment.