diff -Nru init-system-helpers-1.53/debian/changelog init-system-helpers-1.54/debian/changelog --- init-system-helpers-1.53/debian/changelog 2018-08-16 02:52:53.000000000 +0000 +++ init-system-helpers-1.54/debian/changelog 2018-08-17 13:33:08.000000000 +0000 @@ -1,3 +1,17 @@ +init-system-helpers (1.54) unstable; urgency=medium + + * Revert "Drop fallback for old versions of systemd that didn't have + is-enabled" + If a package ships both init script and systemd service file, the + systemd unit will not be enabled by the time invoke-rc.d is called + (with current debhelper sequence). This would make systemctl is-enabled + report the wrong status, and then the service would not be started. + Add a comment noting this to avoid removing again in the future. + This reverts commit 6f95680ffc9b1605841eb7d3d8eb92c790e6c73a. + (Closes: #906421, #906051) + + -- Felipe Sateler Fri, 17 Aug 2018 10:33:08 -0300 + init-system-helpers (1.53) unstable; urgency=medium * tests: only load Linux::Clone if not testing on real system diff -Nru init-system-helpers-1.53/script/invoke-rc.d init-system-helpers-1.54/script/invoke-rc.d --- init-system-helpers-1.53/script/invoke-rc.d 2018-08-16 02:52:53.000000000 +0000 +++ init-system-helpers-1.54/script/invoke-rc.d 2018-08-17 13:33:08.000000000 +0000 @@ -374,7 +374,14 @@ if [ -n "$is_systemd" ]; then case ${ACTION} in start|restart|try-restart) - if systemctl --quiet is-enabled "${UNIT}" 2>/dev/null; then + # If a package ships both init script and systemd service file, the + # systemd unit will not be enabled by the time invoke-rc.d is called + # (with current debhelper sequence). This would make systemctl is-enabled + # report the wrong status, and then the service would not be started. + # This check cannot be removed as long as we support not passing --skip-systemd-native + + if systemctl --quiet is-enabled "${UNIT}" 2>/dev/null || \ + ls ${RCDPREFIX}[S2345].d/S[0-9][0-9]${INITSCRIPTID} >/dev/null 2>&1; then RC=104 elif systemctl --quiet is-active "${UNIT}" 2>/dev/null; then RC=104