From 67c493ca80c48c063c5fcacda10ff7a48767377b Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Fri, 24 Apr 2020 09:58:35 +0500 Subject: [PATCH] disable some centos repos --- install/install.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 38bbbed35..2e7ae005b 100755 --- a/install/install.py +++ b/install/install.py @@ -2066,6 +2066,30 @@ vmail writeToFile.write(content) writeToFile.close() + def enableDisableRepos(self): + + if self.distro == centos: + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-Base.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-Debuginfo.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-Media.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-Vault.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-CR.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-fasttrack.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = "sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-Sources.repo" + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + def main(): parser = argparse.ArgumentParser(description='CyberPanel Installer') @@ -2213,7 +2237,8 @@ def main(): checks.enableDisableFTP('on', distro) checks.installCLScripts() - checks.disablePackegeUpdates() + #checks.disablePackegeUpdates() + checks.enableDisableRepos() logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")