@cryptotaxi247 / netdata-1 / commits / f4fced9b9

Fix kernel test script (#14676)

thiagoftsm committed Mar 8, 2023 at 00:30 UTC f4fced9b90b1569c82a809a048af5d0591b2ea6d
1 file changed +5 -2
packaging/check-kernel-config.sh
+5 -2
@@ -51,15 +51,18 @@ fi
51
52 if [ -n "${CONFIG_PATH}" ]; then
53 GREP='grep'
54 + CAT='cat'
55
56 if echo "${CONFIG_PATH}" | grep -q '.gz'; then
56 - GREP='zgrep'
57 + CAT='zcat'
58 fi
59
60 REQUIRED_CONFIG="KPROBES KPROBES_ON_FTRACE HAVE_KPROBES BPF BPF_SYSCALL BPF_JIT"
61
62 for required_config in ${REQUIRED_CONFIG}; do
62 - if ! "${GREP}" -q "CONFIG_${required_config}=y" "${CONFIG_PATH}"; then
63 + # Fix issue https://github.com/netdata/netdata/issues/14668
64 + # if ! "${GREP}" -q "CONFIG_${required_config}=y" "${CONFIG_PATH}"; then
65 + if ! { "${CAT}" "${CONFIG_PATH}" | "${GREP}" -q "CONFIG_${required_config}=y" >&2 >/dev/null; } ;then
66 echo >&2 " Missing Kernel Config: ${required_config}"
67 exit 1
68 fi