From 070e54fd1bae5344401df06c26f544f9f8f5ec56 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 08:11:24 +0530 Subject: [PATCH 01/19] Update patch_management_lib.rb Workaround for Update Management support for Oracle Linux. setting os short name as "Oracle" directly till it gets fixed at /etc/opt/microsoft/scx/conf/scx-release --- .../PatchManagement/plugin/patch_management_lib.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 2bd9a8f9f..5405d7621 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,6 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -104,6 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 074607f747449239da80120bf32a2f78ff3db7b6 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 08:15:15 +0530 Subject: [PATCH 02/19] Update patch_management_lib.rb fixed indentation --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 5405d7621..d2aaf4ae2 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 3536c63046437cedfcfff3920dc7797b260f407c Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 08:18:38 +0530 Subject: [PATCH 03/19] Update patch_management_lib.rb Workaround to fix os short name for Oracle Linux as "Oracle" till /etc/opt/microsoft/scx/conf/scx-release has proper OSShortName field. --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index d2aaf4ae2..5151274b3 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 800805e79b5c853abea54764f9a671f4c7ba8aa5 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 12:57:01 +0530 Subject: [PATCH 04/19] Update patch_management_lib.rb shortName for Oracle. indentation fix --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 5151274b3..39d623ff5 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From a34cfd4e45c1c97025607c8d3240109aad2015e3 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 13:00:20 +0530 Subject: [PATCH 05/19] Update patch_management_lib.rb fixing indentation --- .../PatchManagement/plugin/patch_management_lib.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 39d623ff5..93aa97b28 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") osFullName = hostOSDetailsMap["OSFullName"] osShortName = hostOSDetailsMap["OSShortName"] if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") os_short_name = "Oracle" end - end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From a4fa694856557d6813d03b263138bff3a9463bd8 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 13:02:07 +0530 Subject: [PATCH 06/19] Update patch_management_lib.rb --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 93aa97b28..16eda4095 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 8e5e260af7e33040b19c7ac73571c3ab2e84d82d Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Wed, 28 Apr 2021 15:38:25 +0530 Subject: [PATCH 07/19] nxOMSPlugin Version Change Changing Version from 3.56 to 3.57 --- Makefile | 2 +- installbuilder/datafiles/Base_DSC.data | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e3e433f21..9cfdefabc 100755 --- a/Makefile +++ b/Makefile @@ -541,7 +541,7 @@ nxOMSGenerateInventoryMof: nxOMSPlugin: rm -rf output/staging; \ - VERSION="3.57"; \ + VERSION="3.58"; \ PROVIDERS="nxOMSPlugin"; \ STAGINGDIR="output/staging/$@/DSCResources"; \ cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ diff --git a/installbuilder/datafiles/Base_DSC.data b/installbuilder/datafiles/Base_DSC.data index 8df017081..48aff8f06 100755 --- a/installbuilder/datafiles/Base_DSC.data +++ b/installbuilder/datafiles/Base_DSC.data @@ -98,7 +98,7 @@ SHLIB_EXT: 'so' /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip; release/nxOMSContainers_1.0.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip; release/nxOMSCustomLog_1.0.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip; release/nxOMSGenerateInventoryMof_1.5.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip; release/nxOMSPlugin_3.57.zip; 755; ${{RUN_AS_USER}}; root +/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip; release/nxOMSPlugin_3.58.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip; release/nxOMSWLI_1.46.zip; 755; ${{RUN_AS_USER}}; root #endif @@ -379,7 +379,7 @@ if [ "$pythonVersion" = "python3" ]; then su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip 0" + su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" else echo "Running python2 python version is ", $pythonVersion @@ -389,7 +389,7 @@ else su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip 0" + su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" #endif From 1fe13f2d28807c900954250f87dfcb02f5e7adef Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 08:11:24 +0530 Subject: [PATCH 08/19] Update patch_management_lib.rb Workaround for Update Management support for Oracle Linux. setting os short name as "Oracle" directly till it gets fixed at /etc/opt/microsoft/scx/conf/scx-release --- .../PatchManagement/plugin/patch_management_lib.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 2bd9a8f9f..5405d7621 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,6 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -104,6 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From a393bf98e26b9f5edb3c99d245f5bf98109caf39 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 08:15:15 +0530 Subject: [PATCH 09/19] Update patch_management_lib.rb fixed indentation --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 5405d7621..d2aaf4ae2 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 9be604f7563ad7702bcf9f8d5c2616433b2ed8de Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 08:18:38 +0530 Subject: [PATCH 10/19] Update patch_management_lib.rb Workaround to fix os short name for Oracle Linux as "Oracle" till /etc/opt/microsoft/scx/conf/scx-release has proper OSShortName field. --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index d2aaf4ae2..5151274b3 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From c4739fc3a860458d29954c236c7e5d53ecf25934 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 12:57:01 +0530 Subject: [PATCH 11/19] Update patch_management_lib.rb shortName for Oracle. indentation fix --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 5151274b3..39d623ff5 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From b5f3c2ceb7eebafdb0d93c34d2532ef66f2fc8f0 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 13:00:20 +0530 Subject: [PATCH 12/19] Update patch_management_lib.rb fixing indentation --- .../PatchManagement/plugin/patch_management_lib.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 39d623ff5..93aa97b28 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") osFullName = hostOSDetailsMap["OSFullName"] osShortName = hostOSDetailsMap["OSShortName"] if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") os_short_name = "Oracle" end - end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 8e0057e7df9f6d75b70f3c5d6b87a51b4dcbcb74 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Tue, 27 Apr 2021 13:02:07 +0530 Subject: [PATCH 13/19] Update patch_management_lib.rb --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 93aa97b28..16eda4095 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From f860e301f3ee4cdb05d6e72c0f92f262bcb886fe Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Wed, 28 Apr 2021 15:38:25 +0530 Subject: [PATCH 14/19] nxOMSPlugin Version Change Changing Version from 3.56 to 3.57 --- Makefile | 759 ------------------------- installbuilder/datafiles/Base_DSC.data | 614 -------------------- 2 files changed, 1373 deletions(-) delete mode 100755 Makefile delete mode 100755 installbuilder/datafiles/Base_DSC.data diff --git a/Makefile b/Makefile deleted file mode 100755 index 9cfdefabc..000000000 --- a/Makefile +++ /dev/null @@ -1,759 +0,0 @@ -SHELL=/bin/bash -include config.mak --include omi-1.0.8/output/config.mak -UNAME_P := $(shell uname -p) -ifeq ($(UNAME_P),x86_64) - PF_ARCH := x64 -else - PF_ARCH := x86 -endif - -current_dir := $(shell pwd) -INSTALLBUILDER_DIR=installbuilder - -ifeq ($(BUILD_OMS),BUILD_OMS) -CONFIG_SYSCONFDIR_DSC=omsconfig -DSC_NAMESPACE=root/oms -OAAS_CERTPATH=/etc/opt/microsoft/omsagent/certs/oms.crt -OAAS_KEYPATH=/etc/opt/microsoft/omsagent/certs/oms.key -OAAS_THUMBRPINT=/etc/opt/microsoft/omsagent/certs/oms.thumbprint -PYTHON_PID_DIR=/var/opt/microsoft/omsconfig -BUILD_OMS_VAL=1 -else -CONFIG_SYSCONFDIR_DSC=dsc -DSC_NAMESPACE=root/Microsoft/DesiredStateConfiguration -OAAS_CERTPATH=$$CONFIG_CERTSDIR/oaas.crt -OAAS_KEYPATH=$$CONFIG_CERTSDIR/oaas.key -OAAS_THUMBPRINT=$$CONFIG_CERTSDIR/oaas.thumbprint -PYTHON_PID_DIR=/var/opt/omi -BUILD_OMS_VAL=0 -endif - -all: - rm -rf release/*.rpm release/*.deb - mkdir -p intermediate/Scripts - mkdir -p intermediate/Scripts/python3 - mkdir -p intermediate/Modules -ifeq ($(BUILD_LOCAL),1) - $(MAKE) local -else - ifeq ($(PF_ARCH),x64) - ln -fs $(current_dir)/ext/curl/x64 $(current_dir)/ext/curl/current_platform - else - ln -fs $(current_dir)/ext/curl/x86 $(current_dir)/ext/curl/current_platform - endif - cd ../pal/build; ./configure --enable-ulinux - ifeq ($(BUILD_SSL_098),1) - rm -rf omi-1.0.8/output_openssl_0.9.8/lib/libdsccore.so - $(MAKE) omi098 - $(MAKE) dsc098 - $(MAKE) dsckit098 - endif - ifeq ($(BUILD_SSL_100),1) - rm -rf omi-1.0.8/output_openssl_1.0.0/lib/libdsccore.so - $(MAKE) omi100 - $(MAKE) dsc100 - $(MAKE) dsckit100 - endif - ifeq ($(BUILD_SSL_110),1) - rm -rf omi-1.0.8/output_openssl_1.1.0/lib/libdsccore.so - $(MAKE) omi110 - $(MAKE) dsc110 - $(MAKE) dsckit110 - endif - -endif - - -ifeq ($(BUILD_OMS),BUILD_OMS) -dsckit098: nx nxOMSPerfCounter nxOMSSyslog nxOMSKeyMgmt nxOMSPlugin nxOMSCustomLog nxOMSSudoCustomLog nxFileInventory nxOMSGenerateInventoryMof nxOMSAgentNPMConfig nxOMSAutomationWorker nxOMSAuditdPlugin nxOMSContainers nxOMSWLI -else -dsckit098: nx nxNetworking nxComputerManagement nxMySQL -endif - $(MAKE) -C $(INSTALLBUILDER_DIR) SSL_VERSION=098 BUILD_RPM=$(BUILD_RPM) BUILD_DPKG=$(BUILD_DPKG) BUILD_OMS_VAL=$(BUILD_OMS_VAL) - - -mkdir -p release; \ - cp omi-1.0.8/output_openssl_0.9.8/release/*.{rpm,deb} output/release/*.{rpm,deb} release/ - -ifeq ($(BUILD_OMS),BUILD_OMS) -dsckit100: nx nxOMSPerfCounter nxOMSSyslog nxOMSKeyMgmt nxOMSPlugin nxOMSCustomLog nxOMSSudoCustomLog nxFileInventory nxOMSGenerateInventoryMof nxOMSAgentNPMConfig nxOMSAutomationWorker nxOMSAuditdPlugin nxOMSContainers nxOMSWLI -else -dsckit100: nx nxNetworking nxComputerManagement nxMySQL -endif - $(MAKE) -C $(INSTALLBUILDER_DIR) SSL_VERSION=100 BUILD_RPM=$(BUILD_RPM) BUILD_DPKG=$(BUILD_DPKG) BUILD_OMS_VAL=$(BUILD_OMS_VAL) - - -mkdir -p release; \ - cp omi-1.0.8/output_openssl_1.0.0/release/*.{rpm,deb} output/release/*.{rpm,deb} release/ - -ifeq ($(BUILD_OMS),BUILD_OMS) -dsckit110: nx nxOMSPerfCounter nxOMSSyslog nxOMSKeyMgmt nxOMSPlugin nxOMSCustomLog nxOMSSudoCustomLog nxFileInventory nxOMSGenerateInventoryMof nxOMSAgentNPMConfig nxOMSAutomationWorker nxOMSAuditdPlugin -else -dsckit110: nx nxNetworking nxComputerManagement nxMySQL -endif - $(MAKE) -C $(INSTALLBUILDER_DIR) SSL_VERSION=110 BUILD_RPM=$(BUILD_RPM) BUILD_DPKG=$(BUILD_DPKG) BUILD_OMS_VAL=$(BUILD_OMS_VAL) - - -mkdir -p release; \ - cp omi-1.0.8/output_openssl_1.1.0/release/*.{rpm,deb} output/release/*.{rpm,deb} release/ - -dsc098: lcm098 providers - mkdir -p intermediate/Scripts - mkdir -p intermediate/Scripts/python3 - mkdir -p intermediate/Modules - . omi-1.0.8/output_openssl_0.9.8/config.mak; \ - for f in LCM/scripts/*.py LCM/scripts/*.sh Providers/Scripts/*.py Providers/Scripts/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/`basename $$f`; \ - chmod a+x intermediate/Scripts/`basename $$f`; \ - done - for f in LCM/scripts/python3/*.py LCM/scripts/python3/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/python3/`basename $$f`; \ - chmod a+x intermediate/Scripts/python3/`basename $$f`; \ - done - if [ -f ../dsc.version ]; then cp -f ../dsc.version build/dsc.version; else cp -f build/Makefile.version build/dsc.version; fi - - -dsc100: lcm100 providers - mkdir -p intermediate/Scripts - mkdir -p intermediate/Scripts/python3 - mkdir -p intermediate/Modules - . omi-1.0.8/output_openssl_1.0.0/config.mak; \ - for f in LCM/scripts/*.py LCM/scripts/*.sh Providers/Scripts/*.py Providers/Scripts/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/`basename $$f`; \ - chmod a+x intermediate/Scripts/`basename $$f`; \ - done - for f in LCM/scripts/python3/*.py LCM/scripts/python3/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/python3/`basename $$f`; \ - chmod a+x intermediate/Scripts/python3/`basename $$f`; \ - done - if [ -f ../dsc.version ]; then cp -f ../dsc.version build/dsc.version; else cp -f build/Makefile.version build/dsc.version; fi - -dsc110: lcm110 providers - mkdir -p intermediate/Scripts - mkdir -p intermediate/Scripts/python3 - mkdir -p intermediate/Modules - . omi-1.0.8/output_openssl_1.1.0/config.mak; \ - for f in LCM/scripts/*.py LCM/scripts/*.sh Providers/Scripts/*.py Providers/Scripts/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/`basename $$f`; \ - chmod a+x intermediate/Scripts/`basename $$f`; \ - done - - for f in LCM/scripts/python3/*.py LCM/scripts/python3/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/python3/`basename $$f`; \ - chmod a+x intermediate/Scripts/python3/`basename $$f`; \ - done - if [ -f ../dsc.version ]; then cp -f ../dsc.version build/dsc.version; else cp -f build/Makefile.version build/dsc.version; fi - - -omi098: - $(MAKE) configureomi098 - rm -rf omi-1.0.8/output - ln -s output_openssl_0.9.8 omi-1.0.8/output - $(MAKE) -C omi-1.0.8 - $(MAKE) -C omi-1.0.8/installbuilder SSL_VERSION=098 BUILD_RPM=$(BUILD_RPM) BUILD_DPKG=$(BUILD_DPKG) SSL_BUILD=0.9.8 - -omi100: - $(MAKE) configureomi100 - rm -rf omi-1.0.8/output - ln -s output_openssl_1.0.0 omi-1.0.8/output - $(MAKE) -C omi-1.0.8 - $(MAKE) -C omi-1.0.8/installbuilder SSL_VERSION=100 BUILD_RPM=$(BUILD_RPM) BUILD_DPKG=$(BUILD_DPKG) SSL_BUILD=1.0.0 - -omi110: - $(MAKE) configureomi110 - rm -rf omi-1.0.8/output - ln -s output_openssl_1.1.0 omi-1.0.8/output - $(MAKE) -C omi-1.0.8 - $(MAKE) -C omi-1.0.8/installbuilder SSL_VERSION=110 BUILD_RPM=$(BUILD_RPM) BUILD_DPKG=$(BUILD_DPKG) SSL_BUILD=1.1.0 - -configureomi098: - (cd omi-1.0.8; ./configure $(DEBUG_FLAGS) --enable-preexec --prefix=/opt/omi --outputdirname=output_openssl_0.9.8 --localstatedir=/var/opt/omi --sysconfdir=/etc/opt/omi/conf --certsdir=/etc/opt/omi/ssl --opensslcflags="$(openssl098_cflags)" --openssllibs="-L$(current_dir)/ext/curl/current_platform/lib $(openssl098_libs)" --openssllibdir="$(openssl098_libdir)") - -configureomi100: - (cd omi-1.0.8; ./configure $(DEBUG_FLAGS) --enable-preexec --prefix=/opt/omi --outputdirname=output_openssl_1.0.0 --localstatedir=/var/opt/omi --sysconfdir=/etc/opt/omi/conf --certsdir=/etc/opt/omi/ssl --opensslcflags="$(openssl100_cflags)" --openssllibs="-L$(current_dir)/ext/curl/current_platform/lib $(openssl100_libs)" --openssllibdir="$(openssl100_libdir)") - -configureomi110: - (cd omi-1.0.8; ./configure $(DEBUG_FLAGS) --enable-preexec --prefix=/opt/omi --outputdirname=output_openssl_1.1.0 --localstatedir=/var/opt/omi --sysconfdir=/etc/opt/omi/conf --certsdir=/etc/opt/omi/ssl --opensslcflags="$(openssl110_cflags)" --openssllibs="-L$(current_dir)/ext/curl/current_platform/lib $(openssl110_libs)" --openssllibdir="$(openssl110_libdir)") - -lcm098: - $(MAKE) -C LCM - -lcm100: - $(MAKE) -C LCM - -lcm110: - $(MAKE) -C LCM - -providers: - $(MAKE) -C Providers - -ifeq ($(BUILD_OMS),BUILD_OMS) -nx: - rm -rf output/staging; \ - VERSION="1.1"; \ - PROVIDERS="nxService nxPackage nxUser nxGroup nxAvailableUpdates"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ -else -nx: - rm -rf output/staging; \ - VERSION="1.1"; \ - PROVIDERS="nxFile nxScript nxUser nxGroup nxService nxPackage nxEnvironment nxSshAuthorizedKeys nxArchive nxFileLine"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ -endif - -nxOMSAutomationWorker: - rm -rf output/staging; \ - VERSION="1.7.4.0"; \ - PROVIDERS="nxOMSAutomationWorker"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/automationworker; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp -r Providers/$${current}/automationworker/* $$STAGINGDIR/MSFT_$${current}Resource/automationworker; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done; \ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxComputerManagement: - rm -rf output/staging; \ - VERSION="1.0"; \ - PROVIDERS="nxComputer"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxNetworking: - rm -rf output/staging; \ - VERSION="1.0"; \ - PROVIDERS="nxDNSServerAddress nxIPAddress nxFirewall"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxMySQL: - rm -rf output/staging; \ - VERSION="1.0"; \ - PROVIDERS="nxMySqlDatabase nxMySqlGrant nxMySqlUser"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSPerfCounter: - rm -rf output/staging; \ - VERSION="2.3"; \ - PROVIDERS="nxOMSPerfCounter"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSSyslog: - rm -rf output/staging; \ - VERSION="2.5"; \ - PROVIDERS="nxOMSSyslog"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSKeyMgmt: - rm -rf output/staging; \ - VERSION="1.0"; \ - PROVIDERS="nxOMSKeyMgmt"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - - -nxOMSCustomLog: - rm -rf output/staging; \ - VERSION="1.0"; \ - PROVIDERS="nxOMSCustomLog"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSSudoCustomLog: - rm -rf output/staging; \ - VERSION="2.7"; \ - PROVIDERS="nxOMSSudoCustomLog"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp -r Providers/Modules/CustomLog/ $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - - -nxOMSGenerateInventoryMof: - rm -rf output/staging; \ - VERSION="1.5"; \ - PROVIDERS="nxOMSGenerateInventoryMof"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSPlugin: - rm -rf output/staging; \ - VERSION="3.58"; \ - PROVIDERS="nxOMSPlugin"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp -r Providers/Modules/Plugins/ $$STAGINGDIR/MSFT_$${current}Resource; \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Plugins; \ - cp -r Providers/Modules/Plugins_$(PF_ARCH)/* $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Plugins; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxFileInventory: - rm -rf output/staging; \ - VERSION="1.4"; \ - PROVIDERS="nxFileInventory"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSAgentNPMConfig: - rm -rf output/staging; \ - VERSION="4.3"; \ - PROVIDERS="nxOMSAgentNPMConfig"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp -r Providers/Modules/NPM/ $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSAuditdPlugin: - rm -rf output/staging; \ - VERSION="1.9"; \ - PROVIDERS="nxOMSAuditdPlugin"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp -r Providers/Modules/nxOMSAuditdPlugin/* $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done;\ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSContainers: - rm -rf output/staging; \ - VERSION="1.0"; \ - PROVIDERS="nxOMSContainers"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/containers; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp -r Providers/$${current}/containers/* $$STAGINGDIR/MSFT_$${current}Resource/containers; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done; \ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -nxOMSWLI: - rm -rf output/staging; \ - VERSION="1.46"; \ - PROVIDERS="nxOMSWLI"; \ - STAGINGDIR="output/staging/$@/DSCResources"; \ - cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ - for current in $$PROVIDERS; do \ - mkdir -p $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/{2.4x-2.5x,2.6x-2.7x,3.x}/Scripts; \ - cp intermediate/Modules/$@.psd1 output/staging/$@/; \ - cp -r Providers/Modules/WLI $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.schema.mof $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/$${current}/MSFT_$${current}Resource.reg $$STAGINGDIR/MSFT_$${current}Resource/; \ - cp Providers/bin/libMSFT_$${current}Resource.so $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH); \ - cp Providers/Scripts/2.4x-2.5x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.4x-2.5x/Scripts; \ - cp Providers/Scripts/2.6x-2.7x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/2.6x-2.7x/Scripts; \ - cp Providers/Scripts/3.x/Scripts/$${current}.py $$STAGINGDIR/MSFT_$${current}Resource/$(PF_ARCH)/Scripts/3.x/Scripts; \ - done; \ - cd output/staging; \ - cd $@; find . -type f -print0 | xargs -0 sha256sum |grep -v sha256sums > ./$@.sha256sums; cd ..;\ - zip -r $@_$${VERSION}.zip $@; \ - mkdir -p ../../release; \ - mv $@_$${VERSION}.zip ../../release/ - -distclean: clean - rm -rf omi-1.0.8/output - rm -rf omi-1.0.8/output_openssl_0.9.8 - rm -rf omi-1.0.8/output_openssl_1.0.0 - rm -rf omi-1.0.8/output_openssl_1.1.0 - -clean: -ifeq ($(BUILD_LOCAL),1) - $(MAKE) -C LCM clean - $(MAKE) -C Providers clean - $(MAKE) -C omi-1.0.8 distclean - rm -rf omi-1.0.8/output - rm -rf output - rm -rf release - rm -rf intermediate -else - $(MAKE) -C LCM clean - $(MAKE) -C Providers clean - rm -rf output - rm -rf release - rm -rf intermediate -endif - - -# To build DSC without making kits (i.e. the old style), run 'make local' -local: - rm -rf release/*.rpm release/*.deb - mkdir -p intermediate/Scripts - mkdir -p intermediate/Modules - $(MAKE) lcm providers -lcm: - $(MAKE) -C omi-1.0.8 - $(MAKE) -C LCM - -reg: lcmreg providersreg - -lcmreg: - $(MAKE) -C LCM deploydsc - -providersreg: - . omi-1.0.8/output/config.mak; \ - for f in LCM/scripts/*.py LCM/scripts/*.sh Providers/Scripts/*.py Providers/Scripts/*.sh; do \ - cat $$f | \ - sed "s@@$(CONFIG_BINDIR)@" | \ - sed "s@@$(CONFIG_LIBDIR)@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR)@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$(CONFIG_LIBDIR)/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(CONFIG_DATADIR)/dsc/modules@" > intermediate/Scripts/`basename $$f`; \ - chmod a+x intermediate/Scripts/`basename $$f`; \ - done - for f in LCM/scripts/python3/*.py LCM/scripts/python3/*.sh; do \ - cat $$f | \ - sed "s@@$$CONFIG_BINDIR@" | \ - sed "s@@$$CONFIG_LIBDIR@" | \ - sed "s@@$$CONFIG_LOCALSTATEDIR@" | \ - sed "s@@$$CONFIG_SYSCONFDIR@" | \ - sed "s@@$(CONFIG_SYSCONFDIR_DSC)@" | \ - sed "s@@$(OAAS_CERTPATH)@" | \ - sed "s@@$(OAAS_KEYPATH)@" | \ - sed "s@@$(OAAS_THUMBPRINT)@" | \ - sed "s@@$$CONFIG_LIBDIR/Scripts@" | \ - sed "s@@$(PYTHON_PID_DIR)@" | \ - sed "s@@$(DSC_NAMESPACE)@" | \ - sed "s@@$(DSC_SCRIPT_PATH)@" | \ - sed "s@@$(DSC_HOST_BASE_PATH)@" | \ - sed "s@@$(DSC_MODULES_PATH)@" > intermediate/Scripts/python3/`basename $$f`; \ - chmod a+x intermediate/Scripts/python3/`basename $$f`; \ - done - $(MAKE) -C Providers reg diff --git a/installbuilder/datafiles/Base_DSC.data b/installbuilder/datafiles/Base_DSC.data deleted file mode 100755 index b73b48df7..000000000 --- a/installbuilder/datafiles/Base_DSC.data +++ /dev/null @@ -1,614 +0,0 @@ -%Variables -SHELL_HEADER: '#!/bin/sh' -SHORT_NAME_PREFIX: 'MSFT' -VENDOR: 'MSFT' -GROUP: 'MSFT' -LICENSE: 'MSFT' -MAINTAINER: 'Microsoft' -COPYRIGHT_FILE: 'Copyright Microsoft' -SHLIB_EXT: 'so' - -%Files -/opt/microsoft/${{SHORT_NAME}}/mof/OMI_BaseResourceUE.mof; LCM/dsc/mof/OMI_BaseResourceUE.mof; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/mof/MSFT_DSCMetaConfiguration.mof; LCM/dsc/mof/MSFT_DSCMetaConfiguration.mof; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/mof/MSFT_LogResource.registration.mof; LCM/dsc/mof/MSFT_LogResource.registration.mof; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/mof/MSFT_LogResource.schema.mof; LCM/dsc/mof/MSFT_LogResource.schema.mof; 755; ${{RUN_AS_USER}}; root -/etc/opt/omi/conf/${{SHORT_NAME}}/dsc.conf; Providers/Extras/Scripts/base_dsc.conf; 755; ${{RUN_AS_USER}}; root - -/opt/microsoft/${{SHORT_NAME}}/Scripts/client.py; intermediate/Scripts/client.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/protocol.py; intermediate/Scripts/protocol.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/nxDSCLog.py; intermediate/Scripts/nxDSCLog.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/zipfile2.6.py; intermediate/Scripts/zipfile2.6.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/OmsConfigHostHelpers.py; intermediate/Scripts/OmsConfigHostHelpers.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/StartDscConfiguration.py; intermediate/Scripts/StartDscConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/TestDscConfiguration.py; intermediate/Scripts/TestDscConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/GetDscConfiguration.py; intermediate/Scripts/GetDscConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/PerformInventory.py; intermediate/Scripts/PerformInventory.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/SetDscLocalConfigurationManager.py; intermediate/Scripts/SetDscLocalConfigurationManager.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/GetDscLocalConfigurationManager.py; intermediate/Scripts/GetDscLocalConfigurationManager.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/PerformRequiredConfigurationChecks.py; intermediate/Scripts/PerformRequiredConfigurationChecks.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/OperationStatusUtility.py; intermediate/Scripts/OperationStatusUtility.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/RestoreConfiguration.py; intermediate/Scripts/RestoreConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/InstallModule.py; intermediate/Scripts/InstallModule.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/RemoveModule.py; intermediate/Scripts/RemoveModule.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/RegenerateInitFiles.py; intermediate/Scripts/RegenerateInitFiles.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/RegisterHelper.sh; intermediate/Scripts/RegisterHelper.sh; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/Register.py; intermediate/Scripts/Register.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/StatusReport.sh; intermediate/Scripts/StatusReport.sh; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/helperlib.py; intermediate/Scripts/helperlib.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/ImportGPGKey.sh; intermediate/Scripts/ImportGPGKey.sh; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/calcPythonPath.sh; intermediate/Scripts/calcPythonPath.sh; 755; ${{RUN_AS_USER}}; root - -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/client.py; intermediate/Scripts/client.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/protocol.py; intermediate/Scripts/protocol.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/nxDSCLog.py; intermediate/Scripts/nxDSCLog.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/zipfile2.6.py; intermediate/Scripts/zipfile2.6.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/OmsConfigHostHelpers.py; intermediate/Scripts/python3/OmsConfigHostHelpers.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/StartDscConfiguration.py; intermediate/Scripts/python3/StartDscConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/TestDscConfiguration.py; intermediate/Scripts/python3/TestDscConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/GetDscConfiguration.py; intermediate/Scripts/python3/GetDscConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/PerformInventory.py; intermediate/Scripts/python3/PerformInventory.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/SetDscLocalConfigurationManager.py; intermediate/Scripts/python3/SetDscLocalConfigurationManager.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/GetDscLocalConfigurationManager.py; intermediate/Scripts/python3/GetDscLocalConfigurationManager.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/PerformRequiredConfigurationChecks.py; intermediate/Scripts/python3/PerformRequiredConfigurationChecks.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/OperationStatusUtility.py; intermediate/Scripts/python3/OperationStatusUtility.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/RestoreConfiguration.py; intermediate/Scripts/python3/RestoreConfiguration.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/InstallModule.py; intermediate/Scripts/python3/InstallModule.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/RemoveModule.py; intermediate/Scripts/python3/RemoveModule.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/RegenerateInitFiles.py; intermediate/Scripts/python3/RegenerateInitFiles.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/RegisterHelper.sh; intermediate/Scripts/python3/RegisterHelper.sh; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/Register.py; intermediate/Scripts/python3/Register.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/StatusReport.sh; intermediate/Scripts/python3/StatusReport.sh; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/helperlib.py; intermediate/Scripts/helperlib.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3/ImportGPGKey.sh; intermediate/Scripts/python3/ImportGPGKey.sh; 755; ${{RUN_AS_USER}}; root - -#if BUILD_OMS == 1 - -/opt/microsoft/omsconfig/etc/logrotate.conf; Providers/Extras/Scripts/omsconfig_logrotate.conf; 644; root; root -/opt/microsoft/omsconfig/bin/OMSConsistencyInvoker; omi-1.0.8/output/bin/OMSConsistencyInvoker; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/etc/Inventory.mof; LCM/Base_Inventory.mof; 644; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/lib/libomsconfig.so; omi-1.0.8/output/lib/libomsconfig.so; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/etc/omsconfig.reg; LCM/omsconfig.reg; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/Scripts/OMSRsyslog.post.sh; intermediate/Scripts/OMSRsyslog.post.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSSysklog.post.sh; intermediate/Scripts/OMSSysklog.post.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSSyslog-ng.post.sh; intermediate/Scripts/OMSSyslog-ng.post.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSServiceStat.sh; intermediate/Scripts/OMSServiceStat.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSServiceStatAll.sh; intermediate/Scripts/OMSServiceStatAll.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSYumUpdates.sh; intermediate/Scripts/OMSYumUpdates.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSZypperUpdates.sh; intermediate/Scripts/OMSZypperUpdates.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSAptUpdates.sh; intermediate/Scripts/OMSAptUpdates.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/NPMAgentBinaryCap.sh; intermediate/Scripts/NPMAgentBinaryCap.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMSAuditdPlugin.sh; intermediate/Scripts/OMSAuditdPlugin.sh; 755; root; root -/opt/microsoft/omsconfig/Scripts/OMS_MetaConfigHelper.py; intermediate/Scripts/OMS_MetaConfigHelper.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/Scripts/python3/OMS_MetaConfigHelper.py; intermediate/Scripts/python3/OMS_MetaConfigHelper.py; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nx_1.1.zip; release/nx_1.1.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSPerfCounter_2.3.zip; release/nxOMSPerfCounter_2.3.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSSyslog_2.5.zip; release/nxOMSSyslog_2.5.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSSudoCustomLog_2.7.zip; release/nxOMSSudoCustomLog_2.7.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSKeyMgmt_1.0.zip; release/nxOMSKeyMgmt_1.0.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/keys/dscgpgkey.asc; LCM/keys/dscgpgkey.asc; 644; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/keys/msgpgkey.asc; LCM/keys/msgpgkey.asc; 644; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxFileInventory_1.4.zip; release/nxFileInventory_1.4.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip; release/nxOMSGenerateInventoryMof_1.5.zip; 755; ${{RUN_AS_USER}}; root - -#if PFARCH == x86 -/opt/microsoft/omsconfig/module_packages/nxOMSAgentNPMConfig_2.2.zip; release/nxOMSAgentNPMConfig_2.2.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSAuditdPlugin_1.7.zip; release/nxOMSAuditdPlugin_1.7.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSAutomationWorker_1.6.9.1.zip; release/nxOMSAutomationWorker_1.6.9.1.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip; release/nxOMSContainers_1.0.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip; release/nxOMSCustomLog_1.0.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip; release/nxOMSGenerateInventoryMof_1.5.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip; release/nxOMSPlugin_3.58.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip; release/nxOMSWLI_1.46.zip; 755; ${{RUN_AS_USER}}; root -#endif - -/opt/dsc/bin/dsc_host; omi-1.0.8/output/bin/dsc_host; 755; ${{RUN_AS_USER}}; root - -#else - -/opt/microsoft/${{SHORT_NAME}}/bin/omi_preexec.sh; intermediate/Scripts/omi_preexec.sh; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/etc/logrotate.conf; Providers/Extras/Scripts/logrotate.conf; 644; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/etc/dsccore.reg; LCM/dsccore.reg; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/bin/ConsistencyInvoker; omi-1.0.8/output/bin/ConsistencyInvoker; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/lib/libdsccore.so; omi-1.0.8/output/lib/libdsccore.so; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/module_packages/nx_1.1.zip; release/nx_1.1.zip; 755; ${{RUN_AS_USER}}; root - - -#endif - - -%Directories -/opt/microsoft; 755; root; root; sysdir -/opt/microsoft/${{SHORT_NAME}}; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/etc; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/mof; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/lib; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/bin; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/modules; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/module_packages; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/keys; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/python3; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/2.4x-2.5x; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/2.4x-2.5x/Scripts; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/2.6x-2.7x; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/2.6x-2.7x/Scripts; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/3.x; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/${{SHORT_NAME}}/Scripts/3.x/Scripts; 755; ${{RUN_AS_USER}}; root -/etc/opt/omi/conf; 755; root; root; sysdir -/etc/opt/omi/conf/${{SHORT_NAME}}; 755; ${{RUN_AS_USER}}; root -/etc/logrotate.d; 755; root; root; sysdir - -#if BUILD_OMS == 1 -/etc/opt/microsoft/omsagent/conf/omsagent.d; 755; ${{RUN_AS_USER}}; root; sysdir -/opt/dsc; 755; ${{RUN_AS_USER}}; root -/opt/dsc/bin; 755; ${{RUN_AS_USER}}; root -/opt/dsc/lib; 755; ${{RUN_AS_USER}}; root -/opt/dsc/output; 755; ${{RUN_AS_USER}}; root -#endif - -%Links -/etc/logrotate.d/${{SHORT_NAME}}; /opt/microsoft/${{SHORT_NAME}}/etc/logrotate.conf; 644; root; root - -%Dependencies -#if BUILD_OMS == 1 - -#if PACKAGE_TYPE == RPM -omsagent >= 1.0.0 -#else -omsagent (>= 1.0.0) -#endif - -#else - -#if PACKAGE_TYPE == RPM -omi >= 1.0.8-6 -#else -omi (>= 1.0.8.6) -#endif - -#endif - -%Preinstall_10 -PREREQ_ERROR=0 - -LIBCURL_SO=`ldconfig -p | grep "libcurl" | awk -F ">" '{print $2}' | awk -F " " '{print $1; exit 0}'` -if [ -z "$LIBCURL_SO" ]; then - echo "Error: Please install curl." - PREREQ_ERROR=1 -fi - -#if BUILD_OMS != 1 -# test if able to perform an hmac sha256 hash -hmacSHA256=`echo -n "TestPlaintext" | openssl dgst -binary -sha256 -hmac "mykey"` -if [ $? -ne 0 ]; then - echo "Error: Unable to perform a SHA256 HMAC operation. Please install a more recent version of OpenSSL that supports this operation." - PREREQ_ERROR=1 - exit 1 -fi - -base64hmac=`echo -n "TestPlaintext" | openssl dgst -binary -sha256 -hmac "mykey" | openssl enc -base64 | tr -d "\n"` -if [ "$base64hmac" != "C9eHLPTYnXyrYXLzmMsya2FWfCFNRlaq75stOI2wbLw=" ]; then - echo "Error: The SHA256 HMAC operation did not create proper output on this system. Please ensure that your openssl libraries are working properly (you may need to reinstall or upgrade them) and then reinstall this agent." - PREREQ_ERROR=1 - exit 1 -fi -#else - -# test for availablity of gpg -which gpg 1> /dev/null 2> /dev/null -if [ $? -ne 0 ]; then - echo "Error: gpg needs to be installed and available in PATH" - PREREQ_ERROR=1 -fi - -if [ $PREREQ_ERROR -eq 1 ]; then - exit 1 -fi -#endif - -%Preinstall_200 -# pythonVersion check must be repeated for each section -if [ ! "$(python2 --version 2>&1 | grep 'not found')" ]; then - echo "Using python2" - pythonVersion="python2" -elif [ ! "$(python3 --version 2>&1 | grep 'not found')" ]; then - echo "Using python3" - pythonVersion="python3" -else - echo "Python not found." -fi -# Only check for ctypes if python2 is installed -if [ "$pythonVersion" = "python2" ]; then - echo "Checking for ctypes python module..." - python2 -c "import ctypes" 1> /dev/null 2> /dev/null - cmdline_ctypes=$? - if [ $cmdline_ctypes -ne 0 ]; then - echo "Error: Python does not support ctypes on this system. Please install the ctypes module for Python or upgrade to a newer version of python that comes with the ctypes module." - echo "Please remove the omi package and try again after installing the ctypes module or upgrading Python. You can check if the ctypes module is installed by starting python and running the command: 'import ctypes'" - exit 1 - fi -fi - -%Preinstall_300 -echo "Cleanning up existing dsc_hosts..." -kill $(ps -eo pid,cmd | grep '/opt/dsc/bin/dsc_host' | grep -v grep | tr -s ' ' | sed 's/^[ \t]*//' | cut -d' ' -f1) -9 2&>1 > /dev/null -chmod -R 777 /opt/dsc -rm -rfv /opt/dsc -rm -f /etc/opt/omi/conf/omsconfig/inventory_lock -echo "Cleaned up existing dsc_hosts..." - -%Postinstall_10 -OMI_HOME=/opt/omi -OMI_REGISTER_DIR=/etc/opt/omi/conf/omiregister/ -CONFIG_SYSCONFDIR=/etc/opt/omi/conf -CONFIG_DATADIR=$OMI_HOME/share -OMI_LIB=$OMI_HOME/lib - -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}} -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/InventoryReports -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/schema -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/schema/MSFT_LogResource -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/baseregistration -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/registration -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/registration/MSFT_LogResource -mkdir -p $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/BuiltinProvCache -mkdir -p $CONFIG_DATADIR/${{SHORT_NAME}} -mkdir -p $CONFIG_DATADIR/${{SHORT_NAME}}/configuration -mkdir -p $CONFIG_DATADIR/${{SHORT_NAME}}/configuration/schema -mkdir -p $CONFIG_DATADIR/${{SHORT_NAME}}/configuration/registration -chmod 700 $CONFIG_SYSCONFDIR/${{SHORT_NAME}} - -#if BUILD_OMS == 1 - -# Set up logging directory -mkdir -p /var/opt/microsoft/omsconfig -chown omsagent /var/opt/microsoft/omsconfig -chgrp omsagent /var/opt/microsoft/omsconfig -chmod 755 /var/opt/microsoft/omsconfig - -# Set up log file -if [ ! -f /var/opt/microsoft/omsconfig/omsconfig.log ]; then - touch /var/opt/microsoft/omsconfig/omsconfig.log -fi -chown omsagent /var/opt/microsoft/omsconfig/omsconfig.log -chgrp omsagent /var/opt/microsoft/omsconfig/omsconfig.log -chmod 644 /var/opt/microsoft/omsconfig/omsconfig.log - -# Set up detailed log file -if [ ! -f /var/opt/microsoft/omsconfig/omsconfigdetailed.log ]; then - touch /var/opt/microsoft/omsconfig/omsconfigdetailed.log -fi -chown omsagent /var/opt/microsoft/omsconfig/omsconfigdetailed.log -chgrp omsagent /var/opt/microsoft/omsconfig/omsconfigdetailed.log -chmod 644 /var/opt/microsoft/omsconfig/omsconfigdetailed.log - -# Set up dsc_host use switch -if [ ! -f /opt/dsc/dsc_host_ready ]; then - touch /opt/dsc/dsc_host_ready -fi -chown omsagent /opt/dsc/dsc_host_ready -chgrp omsagent /opt/dsc/dsc_host_ready -chmod 644 /opt/dsc/dsc_host_ready - -#endif - - -# Create links in omi's directories for DSC data - -#if BUILD_OMS == 1 -mkdir -p $OMI_REGISTER_DIR/root-oms -chmod 755 $OMI_REGISTER_DIR/root-oms -cp -f /opt/microsoft/${{SHORT_NAME}}/etc/*.reg $OMI_REGISTER_DIR/root-oms -cp -f /opt/microsoft/${{SHORT_NAME}}/etc/omsconfig.reg $OMI_REGISTER_DIR/root-oms -ln -fs /opt/microsoft/${{SHORT_NAME}}/lib/libomsconfig.so $OMI_HOME/lib/libomsconfig.so -ln -fs /opt/microsoft/${{SHORT_NAME}}/bin/OMSConsistencyInvoker $OMI_HOME/bin/OMSConsistencyInvoker -#else - -# Make OMI listen on the standard DSC port -$OMI_HOME/bin/omiconfigeditor httpsport -a 5986 < $CONFIG_SYSCONFDIR/omiserver.conf > $CONFIG_SYSCONFDIR/omiserver.conf_temp -mv $CONFIG_SYSCONFDIR/omiserver.conf_temp $CONFIG_SYSCONFDIR/omiserver.conf - -mkdir -p $OMI_REGISTER_DIR/root-Microsoft-DesiredStateConfiguration -cp -f /opt/microsoft/${{SHORT_NAME}}/etc/*.reg $OMI_REGISTER_DIR/root-Microsoft-DesiredStateConfiguration -cp -f /opt/microsoft/${{SHORT_NAME}}/etc/dsccore.reg $OMI_REGISTER_DIR/root-Microsoft-DesiredStateConfiguration/ -ln -fs /opt/microsoft/${{SHORT_NAME}}/lib/libdsccore.so $OMI_HOME/lib/libdsccore.so -ln -fs /opt/microsoft/${{SHORT_NAME}}/bin/ConsistencyInvoker $OMI_HOME/bin/ConsistencyInvoker -ln -fs $OMI_REGISTER_DIR/root-Microsoft-DesiredStateConfiguration $OMI_REGISTER_DIR/root-Microsoft-Windows-DesiredStateConfiguration -#endif - -cp -f /opt/microsoft/${{SHORT_NAME}}/mof/OMI_BaseResourceUE.mof $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/baseregistration/baseresource.schema.mof -cp -f /opt/microsoft/${{SHORT_NAME}}/mof/MSFT_DSCMetaConfiguration.mof $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/baseregistration/MSFT_DSCMetaConfiguration.mof -cp -f /opt/microsoft/${{SHORT_NAME}}/mof/MSFT_LogResource.registration.mof $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/registration/MSFT_LogResource -cp -f /opt/microsoft/${{SHORT_NAME}}/mof/MSFT_LogResource.schema.mof $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/schema/MSFT_LogResource - -chmod a+rx $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/ -chmod a+rx $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration -chmod -R a+rx $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/schema -chmod -R a+rx $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/baseregistration -chmod -R a+rx $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration/registration - -#if BUILD_OMS == 1 -chown -R ${{RUN_AS_USER}} /opt/microsoft/omsconfig/modules -chown -R ${{RUN_AS_USER}} $OMI_REGISTER_DIR/root-oms -chown -R ${{RUN_AS_USER}} /etc/opt/omi/conf/${{SHORT_NAME}} -chown -R ${{RUN_AS_USER}} /opt/microsoft/omsagent/plugin - -# If this is ever changed/removed, coordinate with nxOMSAuditdPlugin author/maintainer(s) -chown -R ${{RUN_AS_USER}} /opt/microsoft/omsconfig/Scripts - -# pythonVersion check must be repeated for each section -if [ ! "$(python2 --version 2>&1 | grep 'not found')" ]; then - echo "Using python2" - pythonVersion="python2" -elif [ ! "$(python3 --version 2>&1 | grep 'not found')" ]; then - echo "Using python3" - pythonVersion="python3" -else - echo "Python not found." -fi - -# Set up built-in resource modules for OMS DSC -if [ "$pythonVersion" = "python3" ]; then - echo "Running python3, python version is ", $pythonVersion - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nx_1.1.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPerfCounter_2.3.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSSyslog_2.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSSudoCustomLog_2.7.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSKeyMgmt_1.0.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxFileInventory_1.4.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" -else - echo "Running python version is ", $pythonVersion - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nx_1.1.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPerfCounter_2.3.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSSyslog_2.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSSudoCustomLog_2.7.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSKeyMgmt_1.0.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxFileInventory_1.4.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" -fi - -#if PFARCH == x86 -if [ "$pythonVersion" = "python3" ]; then - echo "Running python3 python version is ", $pythonVersion - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSAgentNPMConfig_2.2.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSAuditdPlugin_1.7.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSAutomationWorker_1.6.9.1.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" -else - echo "Running python2 python version is ", $pythonVersion - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSAgentNPMConfig_2.2.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSAuditdPlugin_1.7.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSAutomationWorker_1.6.9.1.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" -#endif - -# Set up a built-in resource module for DIY DSC that was removed during OMS Agent update -# This is a temporary workaround to prevent DIY DSC from breaking after the OMS Agent is updated from version 1.4.4-210 or below -# This section can be removed when telemetry shows that customers no longer need to update from version 1.4.4-210 or below - -# Check if DIY DSC install module script is present on the machine -if [ -f /opt/microsoft/dsc/Scripts/InstallModule.py ]; then - # Check if nx module package is available in DIY DSC - if [ -f /opt/microsoft/dsc/module_packages/nx_1.1.zip ]; then - if [ "$pythonVersion" = "python3" ]; then - echo "Running python3" - /opt/microsoft/dsc/Scripts/python3/InstallModule.py /opt/microsoft/dsc/module_packages/nx_1.1.zip 0 - else - echo "Running python2 in Check if DIY DSC install... python version is ", $pythonVersion - /opt/microsoft/dsc/Scripts/InstallModule.py /opt/microsoft/dsc/module_packages/nx_1.1.zip 0 - fi - fi -fi - -# Ensure .reg files all have correct permissions -chmod 644 $OMI_REGISTER_DIR/root-oms/*.reg - -if [ -f "/etc/opt/omi/conf/omsconfig/agentid" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/agentid"; fi -if [ -f "/etc/opt/omi/conf/omsconfig/generated_meta_config.mof" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/generated_meta_config.mof"; fi -if [ -d "/etc/opt/omi/conf/omsconfig/.gnupg" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/.gnupg"; fi -if [ -f "/etc/opt/omi/conf/omsconfig/inventory_lock" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/inventory_lock"; fi -if [ -f "/etc/opt/omi/conf/omsconfig/keymgmtring.gpg" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/keymgmtring.gpg"; fi -if [ -f "/etc/opt/omi/conf/omsconfig/keyring.gpg" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/keyring.gpg"; fi -if [ -f "/etc/opt/omi/conf/omsconfig/last_statusreport" ]; then chown omsagent:omiusers "/etc/opt/omi/conf/omsconfig/last_statusreport"; fi -if [ -d "/var/opt/microsoft/omsconfig" ]; then chown -R omsagent:omiusers /var/opt/microsoft/omsconfig/*; fi -if [ -d "/etc/opt/omi/conf/omsconfig" ]; then chown -R omsagent:omiusers /etc/opt/omi/conf/omsconfig/*; fi - -#else - -# Set up built-in resource module for DIY DSC -if [ "$pythonVersion" = "python3" ]; then - echo "Running python3" - /opt/microsoft/dsc/Scripts/python3/InstallModule.py /opt/microsoft/dsc/module_packages/nx_1.1.zip 0 -else - echo "Running python2 in set up built in python version is ", $pythonVersion - /opt/microsoft/dsc/Scripts/InstallModule.py /opt/microsoft/dsc/module_packages/nx_1.1.zip 0 -fi - - -#endif - -if [ -d $OMI_LIB/Scripts ]; then - rm -rf $OMI_LIB/Scripts -fi -cp -R /opt/microsoft/${{SHORT_NAME}}/Scripts $OMI_LIB/Scripts - -# create symlink from /opt/omi/lib/libcurl.so.4 to wherever libcurl.so is on the system -#if BUILD_OMS == 1 - -CURL_PATH=`which curl` -LIBCURL_SO=`ldd ${CURL_PATH} | grep libcurl.so | awk '{print $3}'` - -# if libcurl was not found (in case of libcurl-gnutls-dev package) let use ldconfig intead. -if [ -z "$LIBCURL_SO" ]; then - echo "Warning: Unable to find libcurl.so using curl CMD: '${CURL_PATH}'. Trying again with ldconfig." - - LIBCURL_SO=`ldconfig -p | grep "libcurl" | awk -F ">" '{print $2}' | awk -F " " '{print $1; exit 0}'` - if [ -z "$LIBCURL_SO" ]; then - echo "Error: Unable to find libcurl in ldconfig. Please install curl." - exit 1 - fi -fi - -#else - -LIBCURL_SO=`ldconfig -p | grep "libcurl" | awk -F ">" '{print $2}' | awk -F " " '{print $1; exit 0}'` -if [ -z "$LIBCURL_SO" ]; then - echo "Error: Unable to find libcurl in ldconfig. Please install curl." - exit 1 -fi - -#endif - -ln -fs $LIBCURL_SO /opt/omi/lib/libcurl.so.3 -ln -fs $LIBCURL_SO /opt/omi/lib/libcurl.so.4 - -#if BUILD_OMS == 1 -chown -R omsagent /opt/microsoft/${{SHORT_NAME}}/Scripts -su - omsagent -c "/opt/microsoft/${{SHORT_NAME}}/Scripts/ImportGPGKey.sh /opt/microsoft/${{SHORT_NAME}}/keys/msgpgkey.asc keymgmtring.gpg" -su - omsagent -c "/opt/microsoft/${{SHORT_NAME}}/Scripts/ImportGPGKey.sh /opt/microsoft/${{SHORT_NAME}}/keys/dscgpgkey.asc keyring.gpg" - - -# Set up a dsc cron job to run the ConsistencyInvoker every 30 minutes which is default freq, this is to fix dsc github issue no 322. -# It is a temporary workaround to create dsc DYI cron job as omsconfig upgrade removes dsc cron job. - -# check if dsc consistency invoker is present on the machine -if [ -f /opt/omi/bin/ConsistencyInvoker ]; then - - # check if we do not have dsc cron file on the box then create one. - if [ ! -f /etc/cron.d/dsc ]; then - echo "*/30 * * * * root /opt/omi/bin/ConsistencyInvoker" > /etc/cron.d/dsc - fi -fi - -#else -cat /etc/crontab | awk '{ if ($7 != "/opt/omi/bin/ConsistencyInvoker") { print $0 } }' > /etc/crontabtmp -cat /etc/crontab | awk '{ if ($7 == "/opt/omi/bin/ConsistencyInvoker") { print $0 } }' > /etc/cron.d/dsc -mv /etc/crontabtmp /etc/crontab -#endif - - -/opt/omi/bin/service_control restart - -#if BUILD_OMS == 1 - -# If omsadmin.conf exists, let's apply the metaconfig -if [ -f /etc/opt/microsoft/omsagent/conf/omsadmin.conf ]; then - if [ "$pythonVersion" = "python3" ]; then - echo "Running python3" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/OMS_MetaConfigHelper.py" - else - echo "Running python2 if omsadmin.conf exists python version is ", $pythonVersion - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/OMS_MetaConfigHelper.py" - fi -fi - -cp -f /opt/microsoft/omsconfig/etc/Inventory.mof /etc/opt/omi/conf/omsconfig/configuration/Inventory.mof -chown omsagent /etc/opt/omi/conf/omsconfig/configuration/Inventory.mof -chgrp omsagent /etc/opt/omi/conf/omsconfig/configuration/Inventory.mof - -#endif - -%Preuninstall_899 -echo "Cleanning up existing dsc_hosts before uninstall..." -kill $(ps -eo pid,cmd | grep '/opt/dsc/bin/dsc_host' | grep -v grep | tr -s ' ' | sed 's/^[ \t]*//' | cut -d' ' -f1) -9 2&>1 > /dev/null -chmod -R 777 /opt/dsc -rm -rfv /opt/dsc -rm -f /etc/opt/omi/conf/omsconfig/inventory_lock -echo "Cleaned up existing dsc_hosts before uninstall..." - -%Preuninstall_999 -# pythonVersion check must be repeated for each section -if [ ! "$(python2 --version 2>&1 | grep 'not found')" ]; then - echo "Using python2" - pythonVersion="python2" -elif [ ! "$(python3 --version 2>&1 | grep 'not found')" ]; then - echo "Using python3" - pythonVersion="python3" -else - echo "Python not found" -fi -# if this is a package removal, not an upgrade, remove the modules -if [ "$1" = "0" -o "$1" = "remove" -o "$1" = "purge" ]; then - # Remove all DSC specific data - if [ "$pythonVersion" = "python3" ]; then - echo "Running python3" - for module in `ls /opt/microsoft/${{SHORT_NAME}}/modules`; do - /opt/microsoft/${{SHORT_NAME}}/Scripts/python3/RemoveModule.py $module - done - else - echo "Running python2 in remove all DSC specific data python version is ", $pythonVersion - for module in `ls /opt/microsoft/${{SHORT_NAME}}/modules`; do - /opt/microsoft/${{SHORT_NAME}}/Scripts/RemoveModule.py $module - done - fi -fi - -%Postuninstall_999 -OMI_HOME=/opt/omi -OMI_REGISTER_DIR=/etc/opt/omi/conf/omiregister -CONFIG_SYSCONFDIR=/etc/opt/omi/conf -CONFIG_DATADIR=$OMI_HOME/share -OMI_LIB=$OMI_HOME/lib - -# if this is a package removal, not an upgrade, remove the modules -if [ "$1" = "0" -o "$1" = "remove" -o "$1" = "purge" ]; then - rm -rf $CONFIG_SYSCONFDIR/${{SHORT_NAME}}/configuration - rm -rf $CONFIG_DATADIR/${{SHORT_NAME}}/ - rm -rf $OMI_LIB/Scripts - rm -rf /opt/microsoft/${{SHORT_NAME}}/ -#if BUILD_OMS == 1 - rm -rf $OMI_REGISTER_DIR/root-oms - rm -f $OMI_HOME/bin/OMSConsistencyInvoker - rm -f $OMI_LIB/libomsconfig.so -#else - rm -rf $OMI_REGISTER_DIR/root-Microsoft-DesiredStateConfiguration - rm -rf $OMI_REGISTER_DIR/root-Microsoft-Windows-DesiredStateConfiguration - rm -f $OMI_HOME/bin/ConsistencyInvoker - rm -f $OMI_LIB/libdsccore.so - # Only to be removed for standalone DSC case - rm -f /etc/cron.d/dsc -#endif - -fi - -#if BUILD_OMS == 1 - -# Remove old output files from calling dsc_host -rm -f /opt/dsc/output/* - -# Note that omsagent's service_control uses systemctl to kill agent (omsagent -# still doesn't shut down in a controlled fashion). Two rapid 'kill -9' -# operations can confuse systemctl, such that the second 'kill -9' operation -# is not completed. This will happen during removal of the shell bundle. End -# result is that the omsagent binary is kept running after the second kill -# operation. -# -# Add a 'sleep' operation (ugly, I know) to try and avoid this race condition. - -/opt/microsoft/omsagent/bin/service_control reload -if pidof systemd 1> /dev/null 2> /dev/null; then - echo "Pausing briefly for systemctl synchronization ..." - sleep 5 -fi - -#endif - -%Preinstall_0 -${{SHELL_HEADER}} -%Postinstall_0 -${{SHELL_HEADER}} -%Preuninstall_0 -${{SHELL_HEADER}} -%Postuninstall_0 -${{SHELL_HEADER}} From ee8b16fc11b32237c4e764d4efd98f92ea725086 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Fri, 30 Apr 2021 01:02:00 +0530 Subject: [PATCH 15/19] Change in nxOMSPlugin Version --- Makefile | 2 +- installbuilder/datafiles/Base_DSC.data | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9cfdefabc..91dbb0888 100755 --- a/Makefile +++ b/Makefile @@ -541,7 +541,7 @@ nxOMSGenerateInventoryMof: nxOMSPlugin: rm -rf output/staging; \ - VERSION="3.58"; \ + VERSION="3.59"; \ PROVIDERS="nxOMSPlugin"; \ STAGINGDIR="output/staging/$@/DSCResources"; \ cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ diff --git a/installbuilder/datafiles/Base_DSC.data b/installbuilder/datafiles/Base_DSC.data index 48aff8f06..c358c07dc 100755 --- a/installbuilder/datafiles/Base_DSC.data +++ b/installbuilder/datafiles/Base_DSC.data @@ -98,7 +98,7 @@ SHLIB_EXT: 'so' /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip; release/nxOMSContainers_1.0.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip; release/nxOMSCustomLog_1.0.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip; release/nxOMSGenerateInventoryMof_1.5.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip; release/nxOMSPlugin_3.58.zip; 755; ${{RUN_AS_USER}}; root +/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.59.zip; release/nxOMSPlugin_3.59.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip; release/nxOMSWLI_1.46.zip; 755; ${{RUN_AS_USER}}; root #endif @@ -379,7 +379,7 @@ if [ "$pythonVersion" = "python3" ]; then su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" + su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.59.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" else echo "Running python2 python version is ", $pythonVersion @@ -389,7 +389,7 @@ else su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" + su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.59.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" #endif From 7b0f2dc8b3ffa8436a4c001dc8a931aa67f96550 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Fri, 30 Apr 2021 01:05:58 +0530 Subject: [PATCH 16/19] indentation fix --- .../plugin/patch_management_lib.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 16eda4095..01c895de7 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") os_short_name = "Oracle" - end - end + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 7c8cbb8d0c3e0ba1dae8427ec6e232b38b74ebc7 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Fri, 30 Apr 2021 01:08:05 +0530 Subject: [PATCH 17/19] indetantion2 --- .../Plugins/PatchManagement/plugin/patch_management_lib.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 01c895de7..186306a08 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -52,13 +52,13 @@ def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") osFullName = hostOSDetailsMap["OSFullName"] osShortName = hostOSDetailsMap["OSShortName"] if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") os_short_name = "Oracle" - end - end + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") From caa498cb72955dde5bfe1fc7ad2401c79d203714 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Fri, 30 Apr 2021 01:13:42 +0530 Subject: [PATCH 18/19] Update patch_management_lib.rb --- .../plugin/patch_management_lib.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb index 186306a08..0cef8a513 100644 --- a/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb +++ b/Providers/Modules/Plugins/PatchManagement/plugin/patch_management_lib.rb @@ -51,14 +51,14 @@ def getHostOSDetails() def getOSShortName(os_short_name = nil, os_version=nil) version = "" hostOSDetailsMap = getHostOSDetails() - #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. - if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") - osFullName = hostOSDetailsMap["OSFullName"] - osShortName = hostOSDetailsMap["OSShortName"] - if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") - os_short_name = "Oracle" - end - end + #os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue. + if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName") + osFullName = hostOSDetailsMap["OSFullName"] + osShortName = hostOSDetailsMap["OSShortName"] + if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle") + os_short_name = "Oracle" + end + end # match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything if hostOSDetailsMap.key?("OSShortName") @@ -112,8 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil) else version = @default_version end - when "Oracle" - version = "6.0" + when "Oracle" + version = "6.0" when "SUSE" if @os_major_version == "11" version = "11.0" From 77022f1429bb5cf7674728799034679ea9024cf9 Mon Sep 17 00:00:00 2001 From: Nikhil M Date: Fri, 30 Apr 2021 01:25:01 +0530 Subject: [PATCH 19/19] reverting version to 3.58 --- Makefile | 2 +- installbuilder/datafiles/Base_DSC.data | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 91dbb0888..9cfdefabc 100755 --- a/Makefile +++ b/Makefile @@ -541,7 +541,7 @@ nxOMSGenerateInventoryMof: nxOMSPlugin: rm -rf output/staging; \ - VERSION="3.59"; \ + VERSION="3.58"; \ PROVIDERS="nxOMSPlugin"; \ STAGINGDIR="output/staging/$@/DSCResources"; \ cat Providers/Modules/$@.psd1 | sed "s@@$${VERSION}@" > intermediate/Modules/$@.psd1; \ diff --git a/installbuilder/datafiles/Base_DSC.data b/installbuilder/datafiles/Base_DSC.data index c358c07dc..48aff8f06 100755 --- a/installbuilder/datafiles/Base_DSC.data +++ b/installbuilder/datafiles/Base_DSC.data @@ -98,7 +98,7 @@ SHLIB_EXT: 'so' /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip; release/nxOMSContainers_1.0.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip; release/nxOMSCustomLog_1.0.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip; release/nxOMSGenerateInventoryMof_1.5.zip; 755; ${{RUN_AS_USER}}; root -/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.59.zip; release/nxOMSPlugin_3.59.zip; 755; ${{RUN_AS_USER}}; root +/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip; release/nxOMSPlugin_3.58.zip; 755; ${{RUN_AS_USER}}; root /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip; release/nxOMSWLI_1.46.zip; 755; ${{RUN_AS_USER}}; root #endif @@ -379,7 +379,7 @@ if [ "$pythonVersion" = "python3" ]; then su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.59.zip 0" + su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" else echo "Running python2 python version is ", $pythonVersion @@ -389,7 +389,7 @@ else su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0" - su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.59.zip 0" + su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0" su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0" #endif