def getset_packagerepo_commands(self):
"""Gets and sets the system package and repo list commands.
Raises:
NotImplementedError: Unsupported Distribution.
"""
if self.dist == 'Ubuntu':
self.package_command = '/usr/bin/apt list --installed'
self.repo_command = '/bin/cat /etc/apt/sources.list | sed -e "/^#/d" -e "/^$/d"'
elif self.dist == 'centos':
self.package_command = '/usr/bin/yum list installed'
self.repo_command = '/usr/bin/yum -v repolist'
评论列表
文章目录