From 27a7162672bf8e9cbc52ab6b59a855644d8d2a71 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sun, 15 Sep 2024 16:34:29 +0500 Subject: [PATCH] turnon quota --- install/install.py | 3 ++- plogical/test.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install/install.py b/install/install.py index df18bb809..d5e8d5206 100755 --- a/install/install.py +++ b/install/install.py @@ -165,7 +165,8 @@ def installQuota(self,): command = "find /lib/modules/ -type f -name '*quota_v*.ko*'" - if subprocess.check_output(command,shell=True, stderr=subprocess.STDOUT).decode("utf-8").find("quota/") == -1: + + if subprocess.check_output(command,shell=True).decode("utf-8").find("quota/") == -1: command = "sudo apt install linux-image-extra-virtual -y" preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) diff --git a/plogical/test.py b/plogical/test.py index f9bcf87c9..7477b1928 100644 --- a/plogical/test.py +++ b/plogical/test.py @@ -38,7 +38,8 @@ def edit_fstab(mount_point, options_to_add): WriteToFile.write(line) WriteToFile.close() - command = "find /lib/modules/ -type f -name '*quota_v*.ko*' | sed -n 's|/lib/modules/\\([^/]*\\)/.*|\\1|p' | sort -u" + command = "find /lib/modules/ -type f -name '*quota_v*.ko*'" + print(command) try: result = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).decode("utf-8").rstrip('\n') print(repr(result))