diff --git a/debian/koha-sysv.install b/debian/koha-sysv.install deleted file mode 100644 index c2dca6c03c..0000000000 --- a/debian/koha-sysv.install +++ /dev/null @@ -1 +0,0 @@ -debian/koha-sysv.init etc/init.d/koha-common diff --git a/debian/koha-sysv.init b/debian/koha-sysv.koha-common.init similarity index 100% rename from debian/koha-sysv.init rename to debian/koha-sysv.koha-common.init diff --git a/debian/koha-sysv.postinst b/debian/koha-sysv.postinst index ec8edf56f9..81b3e74a0c 100755 --- a/debian/koha-sysv.postinst +++ b/debian/koha-sysv.postinst @@ -2,19 +2,10 @@ set -e -case "$1" in - configure) - # Bug 18250: Correct startup order of koha-common and memcached. - # On non-systemd systems only: force the rc.d ordering. - # On systemd hosts, systemd-sysv-generator wraps /etc/init.d/koha-common - # as koha-common.service and honors the rc.d symlinks; no manual - # enable needed. - if [ ! -d /run/systemd/system ]; then - update-rc.d koha-common disable - update-rc.d koha-common enable - fi - ;; -esac +# /etc/init.d/koha-common is installed by dh_installinit --name=koha-common +# (see debian/rules), which also generates the update-rc.d / invoke-rc.d +# handling below. On systemd hosts systemd-sysv-generator wraps the script +# as koha-common.service and honours those rc.d links. #DEBHELPER# diff --git a/debian/koha-sysv.postrm b/debian/koha-sysv.postrm deleted file mode 100755 index 3936c791c1..0000000000 --- a/debian/koha-sysv.postrm +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "purge" ]; then - # Disable the service on systemd systems - if [ -d /run/systemd/system ]; then - deb-systemd-helper purge koha-common.service >/dev/null || true - deb-systemd-helper unmask koha-common.service >/dev/null || true - fi -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/koha-sysv.prerm b/debian/koha-sysv.prerm deleted file mode 100755 index ad89ea127c..0000000000 --- a/debian/koha-sysv.prerm +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "remove" ]; then - # Stop the service - if [ -d /run/systemd/system ]; then - deb-systemd-invoke stop koha-common.service >/dev/null || true - else - invoke-rc.d koha-common stop || true - fi -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 8027ea5299..852a5a2b9b 100755 --- a/debian/rules +++ b/debian/rules @@ -8,6 +8,13 @@ export PERL_MM_USE_DEFAULT=1 %: dh $@ --fail-missing --with bash-completion +# koha-sysv ships the SysV init script under its historical name so that +# dpkg hands /etc/init.d/koha-common over from the old monolithic koha-common +# package and debhelper generates the matching update-rc.d/invoke-rc.d code. +override_dh_installinit: + dh_installinit -pkoha-sysv --name=koha-common + dh_installinit --remaining-packages + override_dh_gencontrol: debian/bd-to-depends >> debian/koha-common.substvars debian/bd-to-depends >> debian/koha-core.substvars