From 8f11e0df76c6aa4bcbcb3f9877aa0a8a7287a8fd Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Fri, 4 Mar 2022 14:08:58 +0000 Subject: [PATCH] debian: Clean up services starting This commit does several things at once: - Create a symlink for /etc/init.d/functions (centos) from /lib/lsb/init-functions, to maintain compatibility. - Make /etc/systemd/system-preset so that when a service is installed it places a preset file in the directory. - Remove hardcoded services. Test Plan: PASS Build package PASS Build and install ISO PASS check for symlink /etc/init.d/functions PASS check for /etc/systemd/system-preset PASS check for running services Story: 2009101 Task: 44678 Signed-off-by: Chuck Short Change-Id: I9c5ec7eb7177dd7dde954db5d0c3d3f602677ccd --- .../debian/deb_folder/centos-debian-compat.install | 2 +- .../debian/deb_folder/centos-debian-compat.links | 2 ++ centos-debian-compat/debian/deb_folder/postinst | 6 ------ centos-debian-compat/debian/deb_folder/rules | 8 ++++---- .../source/stx/systemd/85-debpkg-issues.preset | 1 - 5 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 centos-debian-compat/debian/deb_folder/centos-debian-compat.links delete mode 100644 centos-debian-compat/debian/deb_folder/postinst diff --git a/centos-debian-compat/debian/deb_folder/centos-debian-compat.install b/centos-debian-compat/debian/deb_folder/centos-debian-compat.install index 5f3b490a6..a4dcd77dc 100644 --- a/centos-debian-compat/debian/deb_folder/centos-debian-compat.install +++ b/centos-debian-compat/debian/deb_folder/centos-debian-compat.install @@ -1 +1 @@ -/lib/systemd/system-preset/* +/etc/systemd/system-preset/* diff --git a/centos-debian-compat/debian/deb_folder/centos-debian-compat.links b/centos-debian-compat/debian/deb_folder/centos-debian-compat.links new file mode 100644 index 000000000..ec3d5e677 --- /dev/null +++ b/centos-debian-compat/debian/deb_folder/centos-debian-compat.links @@ -0,0 +1,2 @@ +# enable compatibility between Debian and Centos +/lib/lsb/init-functions /etc/init.d/functions diff --git a/centos-debian-compat/debian/deb_folder/postinst b/centos-debian-compat/debian/deb_folder/postinst deleted file mode 100644 index 1a917706c..000000000 --- a/centos-debian-compat/debian/deb_folder/postinst +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -e - -echo "source /lib/lsb/init-functions" > /etc/init.d/functions - -#DEBHELPER# diff --git a/centos-debian-compat/debian/deb_folder/rules b/centos-debian-compat/debian/deb_folder/rules index db22663a4..0023bd023 100644 --- a/centos-debian-compat/debian/deb_folder/rules +++ b/centos-debian-compat/debian/deb_folder/rules @@ -4,8 +4,8 @@ dh $@ override_dh_auto_install: - install -d debian/tmp/lib/systemd/system-preset - install -m 544 stx/systemd/99-default-disable.preset debian/tmp/lib/systemd/system-preset - install -m 544 stx/systemd/90-default.preset debian/tmp/lib/systemd/system-preset - install -m 544 stx/systemd/85-debpkg-issues.preset debian/tmp/lib/systemd/system-preset + install -d debian/tmp/etc/systemd/system-preset + install -m 544 stx/systemd/99-default-disable.preset debian/tmp/etc/systemd/system-preset + install -m 544 stx/systemd/90-default.preset debian/tmp/etc/systemd/system-preset + install -m 544 stx/systemd/85-debpkg-issues.preset debian/tmp/etc/systemd/system-preset dh_install diff --git a/centos-debian-compat/source/stx/systemd/85-debpkg-issues.preset b/centos-debian-compat/source/stx/systemd/85-debpkg-issues.preset index ea4520bc9..61460b91d 100644 --- a/centos-debian-compat/source/stx/systemd/85-debpkg-issues.preset +++ b/centos-debian-compat/source/stx/systemd/85-debpkg-issues.preset @@ -7,7 +7,6 @@ # with all packages installed regardless of personality. # config-gate.spec -enable config.service #enable worker-config.service # controllerconfig.spec