def check_prerequsites(self):
# TODO: Check that OS is Ubuntu?!
# Check for sudo permission
command = "timeout --foreground 2 sudo id"
return_value = os.system("{0} > /dev/null 2>&1".format(command))
exit_status = os.WEXITSTATUS(return_value)
if exit_status != 0:
print "* ERROR: cyris: Passwordless sudo execution is not enabled."
self.handle_error()
quit(-1)
# TODO: Check that SSH keys are defined?!
# TODO: Check if Internet access is available?!
#########################################################################
# Given a file with full path, separate the file name and the absolute path
评论列表
文章目录