Skip to content

Commit

Permalink
turnon quota
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Sep 15, 2024
1 parent fc4ba97 commit 27a7162
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion plogical/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 27a7162

Please sign in to comment.