From def30a7b8dd536b0457d86247dc31f3d97c8337a Mon Sep 17 00:00:00 2001 From: usmannasir Date: Thu, 19 Sep 2024 16:44:32 +0500 Subject: [PATCH] bug fix: remove prompt on ubuntu --- install/install.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/install.py b/install/install.py index b3603010e..e82526cc5 100755 --- a/install/install.py +++ b/install/install.py @@ -182,15 +182,15 @@ class preFlightsChecks: 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.") @@ -229,8 +229,8 @@ class preFlightsChecks: 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) ###