Package: openstack-pkg-tools
Version: 109
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu focal ubuntu-patch
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* pkgos-gen-systemd-unit: Ensure AFTER and WANTS are initialized when
one of Should-Start or Required-Start are specified.
Thanks for considering the patch.
-- System Information:
Debian Release: bullseye/sid
APT prefers focal
APT policy: (500, 'focal')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-14-generic (SMP w/4 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru openstack-pkg-tools-108/init-template/pkgos-gen-systemd-unit
openstack-pkg-tools-109/init-template/pkgos-gen-systemd-unit
--- openstack-pkg-tools-108/init-template/pkgos-gen-systemd-unit
2020-02-14 08:54:31.000000000 -0500
+++ openstack-pkg-tools-109/init-template/pkgos-gen-systemd-unit
2020-02-27 10:37:44.000000000 -0500
@@ -42,12 +42,15 @@
X_START_BEFORE=$(cat ${INIT_TEMPLATE} | grep "# X-Start-Before:" | sed 's/#
X-Start-Before://')
REQUIRED_START=$(cat ${INIT_TEMPLATE} | grep "# Required-Start:" | sed 's/#
Required-Start://')
-if [ -n "${SHOULD_START}" ] ; then
+if [ -n "${SHOULD_START}" ] || [ -n "${REQUIRED_START}" ] ; then
AFTER="After="
+ WANTS="Wants="
+fi
+
+if [ -n "${SHOULD_START}" ] ; then
for i in ${SHOULD_START} ; do
AFTER="${AFTER}${i}.service "
done
- WANTS="Wants="
fi
for i in $(cat ${INIT_TEMPLATE} | grep "# Required-Start:" | sed 's/#
Required-Start://' ) ; do