From 9ddc85d916403155004f39dc4afc10e5712583b8 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 13 Jul 2022 10:17:17 -0400 Subject: [PATCH] debian: Disable dnsmasq systemd at start Disable the dnsmasq service from starting at boot. This is for feature parity with Centos 7. Test Plan PASS Build Package PASS Build ISO PASS Check for dnsmasq not starting at boot PASS Check for dnsmasq running after unlock Story: 2009221 Task: 45784 Signed-off-by: Charles Short Change-Id: Id630ad34551939efa87ab52214076fb68406cdd4 --- .../0001-Disable-systemd-for-dnsmasq.patch | 43 +++++++++++++++++++ base/dnsmasq/debian/deb_patches/series | 1 + 2 files changed, 44 insertions(+) create mode 100644 base/dnsmasq/debian/deb_patches/0001-Disable-systemd-for-dnsmasq.patch create mode 100644 base/dnsmasq/debian/deb_patches/series diff --git a/base/dnsmasq/debian/deb_patches/0001-Disable-systemd-for-dnsmasq.patch b/base/dnsmasq/debian/deb_patches/0001-Disable-systemd-for-dnsmasq.patch new file mode 100644 index 000000000..30dee65f3 --- /dev/null +++ b/base/dnsmasq/debian/deb_patches/0001-Disable-systemd-for-dnsmasq.patch @@ -0,0 +1,43 @@ +From 55cae4e85d59b5c6cbfd00257833ccaab2b76982 Mon Sep 17 00:00:00 2001 +From: Charles Short +Date: Wed, 13 Jul 2022 10:04:57 -0400 +Subject: [PATCH] Disable systemd for dnsmasq + +Disable systemd from starting at boot since its managed by the +sm service. + +Signed-off-by: Charles Short +--- + debian/postinst | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/debian/postinst b/debian/postinst +index 8c93160..38c2a07 100644 +--- a/debian/postinst ++++ b/debian/postinst +@@ -4,22 +4,6 @@ set -e + # /usr/share/doc/dnsmasq was a symlink in versions < 2.81-1 (see #985282) + dpkg-maintscript-helper symlink_to_dir /usr/share/doc/dnsmasq dnsmasq-base 2.84-1.2~ dnsmasq -- "$@" + +-# Code copied from dh_systemd_enable ---------------------- +-# This will only remove masks created by d-s-h on package removal. +-deb-systemd-helper unmask dnsmasq.service >/dev/null || true +- +-# was-enabled defaults to true, so new installations run enable. +-if deb-systemd-helper --quiet was-enabled dnsmasq.service; then +- # Enables the unit on first installation, creates new +- # symlinks on upgrades if the unit file has changed. +- deb-systemd-helper enable dnsmasq.service >/dev/null || true +-else +- # Update the statefile to add new symlinks (if any), which need to be +- # cleaned up on purge. Also remove old symlinks. +- deb-systemd-helper update-state dnsmasq.service >/dev/null || true +-fi +-# End code copied from dh_systemd_enable ------------------ +- + if [ -x /etc/init.d/dnsmasq ]; then + update-rc.d dnsmasq defaults 15 85 >/dev/null + +-- +2.25.1 + diff --git a/base/dnsmasq/debian/deb_patches/series b/base/dnsmasq/debian/deb_patches/series new file mode 100644 index 000000000..6507e7312 --- /dev/null +++ b/base/dnsmasq/debian/deb_patches/series @@ -0,0 +1 @@ +0001-Disable-systemd-for-dnsmasq.patch