Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Common/WALinuxAgent-2.0.16/waagent
Original file line number Diff line number Diff line change
Expand Up @@ -6507,10 +6507,34 @@ def DistInfo(fullname=0):
if 'linux_distribution' in dir(platform):
distinfo = list(platform.linux_distribution(full_distribution_name=fullname))
distinfo[0] = distinfo[0].strip() # remove trailing whitespace in distro name
if not distinfo[0]:
distinfo = dist_info_SLES15()
return distinfo
else:
return platform.dist()

def dist_info_SLES15():
os_release_filepath = "/etc/os-release"
if not os.path.isfile(os_release_filepath):
return ["","",""]
info = open(os_release_filepath).readlines()
found_name_sles = False
found_id_sles = False
version_id = ""
for line in info:
if "NAME=\"SLES\"" in line:
found_name_sles = True
if "ID=\"sles\"" in line:
found_id_sles = True
if "VERSION_ID" in line:
match = re.match(r'VERSION_ID="([.0-9]+)"', line)
if match:
version_id = match.group(1)
if found_name_sles and found_id_sles and version_id:
return "SuSE", version_id, "suse"
return ["","",""]



def PackagedInstall(buildroot):
"""
Expand Down
2 changes: 1 addition & 1 deletion VMAccess/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ExtensionImage xmlns="http://schemas.microsoft.com/windowsazure">
<ProviderNameSpace>Microsoft.OSTCExtensions</ProviderNameSpace>
<Type>VMAccessForLinux</Type>
<Version>1.5.2</Version>
<Version>1.5.3</Version>
<Label>Microsoft Azure VM Access Extension for Linux Virtual Machines</Label>
<HostingResources>VmRole</HostingResources>
<MediaLink></MediaLink>
Expand Down