Skip to content

Commit

Permalink
bug fix: remove prompt on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Sep 19, 2024
1 parent 6d7a2c0 commit def30a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ def installQuota(self,):
command = 'apt update -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)

command = 'apt install quota -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = 'DEBIAN_FRONTEND=noninteractive apt install quota -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR, True)

command = "find /lib/modules/ -type f -name '*quota_v*.ko*'"


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)
command = "DEBIAN_FRONTEND=noninteractive apt install linux-image-extra-virtual -y"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR, True)

if self.edit_fstab('/', '/') == 0:
preFlightsChecks.stdOut("Quotas will not be abled as we are are failed to modify fstab file.")
Expand Down Expand Up @@ -229,8 +229,8 @@ def installQuota(self,):
ffResult = subprocess.run(command, capture_output=True, text=True, shell=True)
ffResult = ffResult.stdout.rstrip('\n')

command = f"apt-get install linux-modules-extra-{ffResult}"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = f"DEBIAN_FRONTEND=noninteractive apt-get install linux-modules-extra-{ffResult}"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR, True)

###

Expand Down

0 comments on commit def30a7

Please sign in to comment.