From 34cc659ff75555ce15d2d4eca50dc3f1fdb51002 Mon Sep 17 00:00:00 2001 From: Mikhail Sandakov Date: Thu, 24 Oct 2024 10:37:33 +0300 Subject: [PATCH] Add a function to gather kernel modules for the feedback archive --- pleskdistup/common/src/feedback.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pleskdistup/common/src/feedback.py b/pleskdistup/common/src/feedback.py index a405b45..b1cff2c 100644 --- a/pleskdistup/common/src/feedback.py +++ b/pleskdistup/common/src/feedback.py @@ -150,3 +150,12 @@ def collect_plesk_version(out_file_path: str = "plesk_version.txt") -> typing.Li version_file.write(lines + "\n") return [out_file_path] + + +def collect_kernel_modules(out_file_path: str = "kernel_modules.txt") -> typing.List[str]: + _collect_command_output( + ["/usr/sbin/lsmod"], + out_file_path, + "Getting kernel modules (called as {args}) failed: {ex}\n", + ) + return [out_file_path]