Code: Select all
root@openvpnas2:~# python ./awslogs-agent-setup.py --region eu-central-1
Launching interactive setup of CloudWatch Logs agent ...
ERROR: Failed to determine linux distribution. Exiting.
Code: Select all
def get_distro_info(self):
default_issue_file_path = "/etc/issue"
redhat_version_file_path = "/etc/redhat-release"
if os.path.isfile(redhat_version_file_path):
issue_file_path = redhat_version_file_path
elif os.path.isfile(default_issue_file_path):
issue_file_path = default_issue_file_path
else:
fail("Failed to determine linux distribution. Exiting.", PLATFORM_NOT_SUPPORTED)
# Support Amazon Linux, Ubuntu, CentOS, Debian, Raspbian and RHEL.
with open(issue_file_path, "r") as issue_file:
line = issue_file.readline()
if line.startswith("Amazon Linux AMI"):
return self.AmazonLinux
elif line.startswith("Ubuntu"):
return self.Ubuntu
elif line.startswith("Red Hat"):
return self.Rhel
elif line.startswith("CentOS"):
return self.CentOS
elif line.startswith("Raspbian"):
return self.Raspbian
elif line.startswith("Debian"):
return self.Debian
else:
fail("Failed to determine linux distribution. Exiting.", PLATFORM_NOT_SUPPORTED)
Code: Select all
root@openvpnas2:~# cat /etc/issue
OpenVPN Access Server Appliance 2.1.9 \n \l
Thank you in advance for your help in this matter.
Best regards
Sebastian Martinka