diff --git a/service-mgmt-api/debian/deb_folder/rules b/service-mgmt-api/debian/deb_folder/rules index 9c20701e..8ad5a88f 100755 --- a/service-mgmt-api/debian/deb_folder/rules +++ b/service-mgmt-api/debian/deb_folder/rules @@ -3,6 +3,7 @@ export PYBUILD_NAME=sm-api ROOT := debian/tmp +PMONDIR := usr/share/starlingx/pmon.d %: dh $@ --with python3 --buildsystem=pybuild @@ -22,11 +23,13 @@ override_dh_install: install -d $(ROOT)/etc/sm install -d $(ROOT)/etc/init.d install -d $(ROOT)/etc/pmon.d + install -d $(ROOT)/$(PMONDIR) install -d $(ROOT)/lib/systemd/system/ - install -m 644 -p -D scripts/sm_api.ini $(ROOT)/etc/sm install -m 755 -p -D scripts/sm-api $(ROOT)/etc/init.d - install -m 644 -p -D scripts/sm-api.service $(ROOT)/lib/systemd/system/ + install -m 644 -p -D scripts/sm_api.ini $(ROOT)/etc/sm + install -m 644 -p -D scripts/sm-api.conf $(ROOT)/$(PMONDIR) install -m 644 -p -D scripts/sm-api.conf $(ROOT)/etc/pmon.d + install -m 644 -p -D scripts/sm-api.service $(ROOT)/lib/systemd/system/ dh_install diff --git a/service-mgmt-api/debian/deb_folder/sm-api.install b/service-mgmt-api/debian/deb_folder/sm-api.install index 2f5f7410..b52a50b9 100644 --- a/service-mgmt-api/debian/deb_folder/sm-api.install +++ b/service-mgmt-api/debian/deb_folder/sm-api.install @@ -1,9 +1,9 @@ -etc/sm-api/policy.json -usr/bin/sm-api +debian/systemd/00-sm-api.preset etc/systemd/system-preset etc/init.d/sm-api etc/pmon.d/sm-api.conf etc/sm/sm_api.ini +etc/sm-api/policy.json lib/systemd/system/* +usr/bin/sm-api usr/lib/python3* -debian/systemd/00-sm-api.preset etc/systemd/system-preset - +usr/share/starlingx/pmon.d/sm-api.conf diff --git a/service-mgmt/sm-common/debian/deb_folder/rules b/service-mgmt/sm-common/debian/deb_folder/rules index f3f89f27..1df9191b 100755 --- a/service-mgmt/sm-common/debian/deb_folder/rules +++ b/service-mgmt/sm-common/debian/deb_folder/rules @@ -1,10 +1,12 @@ #!/usr/bin/make -f export ROOT = $(CURDIR)/debian/tmp +export PMONDIR = usr/share/starlingx/pmon.d export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') export VER_MJR = $(shell echo $(VER) | cut -d. -f1) + %: dh $@ @@ -20,6 +22,9 @@ override_dh_auto_install: VER_MJR=${VER_MJR} \ install + install -m 750 -d $(ROOT)/$(PMONDIR) + install -m 640 -p -D scripts/sm-eru.conf $(ROOT)/$(PMONDIR) + # Prevents dh_fixperms from changing the permissions defined in the makefiles override_dh_fixperms: dh_fixperms \ diff --git a/service-mgmt/sm-common/debian/deb_folder/sm-eru.install b/service-mgmt/sm-common/debian/deb_folder/sm-eru.install index e111449a..9f16da76 100644 --- a/service-mgmt/sm-common/debian/deb_folder/sm-eru.install +++ b/service-mgmt/sm-common/debian/deb_folder/sm-eru.install @@ -1,6 +1,7 @@ +debian/systemd/00-sm-eru.preset etc/systemd/system-preset etc/init.d/sm-eru etc/pmon.d/sm-eru.conf +lib/systemd/system/sm-eru.service usr/bin/sm-eru usr/bin/sm-eru-dump -lib/systemd/system/sm-eru.service -debian/systemd/00-sm-eru.preset etc/systemd/system-preset +usr/share/starlingx/pmon.d/sm-eru.conf diff --git a/service-mgmt/sm/debian/deb_folder/rules b/service-mgmt/sm/debian/deb_folder/rules index 1f329f44..8be73ba5 100755 --- a/service-mgmt/sm/debian/deb_folder/rules +++ b/service-mgmt/sm/debian/deb_folder/rules @@ -1,6 +1,7 @@ #!/usr/bin/make -f ROOT := $(CURDIR)/debian/tmp +PMONDIR := usr/share/starlingx/pmon.d %: dh $@ @@ -13,6 +14,10 @@ override_dh_auto_install: $(MAKE) DEST_DIR=${ROOT} \ UNIT_DIR=/lib/systemd/system \ install + + install -d ${ROOT}/$(PMONDIR) + install -m 644 scripts/sm.conf ${ROOT}/$(PMONDIR) + dh_install override_dh_installsystemd: diff --git a/service-mgmt/sm/debian/deb_folder/sm.install b/service-mgmt/sm/debian/deb_folder/sm.install index df215784..6bf9ba95 100644 --- a/service-mgmt/sm/debian/deb_folder/sm.install +++ b/service-mgmt/sm/debian/deb_folder/sm.install @@ -1,10 +1,11 @@ -lib/systemd/system/* -usr/bin/sm -usr/local/sbin/sm-notify -usr/local/sbin/sm-troubleshoot -usr/local/sbin/sm-notification +debian/systemd/00-sm.preset etc/systemd/system-preset etc/init.d/sm etc/init.d/sm-shutdown -etc/pmon.d/sm.conf etc/logrotate.d/sm.logrotate -debian/systemd/00-sm.preset etc/systemd/system-preset +etc/pmon.d/sm.conf +lib/systemd/system/* +usr/bin/sm +usr/local/sbin/sm-notification +usr/local/sbin/sm-notify +usr/local/sbin/sm-troubleshoot +usr/share/starlingx/pmon.d/sm.conf