From ac0823634df6dd440f0e36399f59629b0418abfb Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Mon, 29 May 2023 15:08:38 +0200 Subject: [PATCH] fix(packaging): manage properle vmware config ile --- .../centreon-plugin-virtualization-vmware-daemon.yaml | 4 ++++ connectors/vmware/packaging/scripts/postinstall.sh | 7 +++++++ .../perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml | 1 + 3 files changed, 12 insertions(+) create mode 100644 connectors/vmware/packaging/scripts/postinstall.sh diff --git a/connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml b/connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml index 5ad0112dd..165175b98 100644 --- a/connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml +++ b/connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml @@ -65,6 +65,10 @@ contents: - src: "config/centreon_vmware-conf.pm" dst: "/etc/centreon/centreon_vmware.pm" type: config|noreplace + packager: rpm + - src: "config/centreon_vmware-conf.pm" + dst: "/etc/centreon/centreon_vmware.pm.new" + packager: deb overrides: rpm: diff --git a/connectors/vmware/packaging/scripts/postinstall.sh b/connectors/vmware/packaging/scripts/postinstall.sh new file mode 100644 index 000000000..33b8a2557 --- /dev/null +++ b/connectors/vmware/packaging/scripts/postinstall.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then # deb + if [ ! -f "/etc/centreon/centreon_vmware.pm" ]; then + mv /etc/centreon/centreon_vmware.pm.new /etc/centreon/centreon_vmware.pm + fi +fi diff --git a/dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml b/dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml index 2b3165ece..ec0a6178a 100644 --- a/dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml +++ b/dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml @@ -58,6 +58,7 @@ overrides: - libnet-smtp-ssl-perl - libsoap-lite-perl - libtext-template-perl + - libxml-libxml-perl rpm: compression: zstd