summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-07-14 22:14:47 +0200
committerMichael Stapelberg <michael@stapelberg.de>2013-07-14 22:14:47 +0200
commit8cd557b8e33ce2edbf2bc8924309c347c45a01c2 (patch)
tree3e7ea150b9230ece8b264c01f6df85305ed2dbdf
parent81b808b8a37fee69b0e1e3085b0cb5b90156c671 (diff)
downloadinit-system-helpers-8cd557b8e33ce2edbf2bc8924309c347c45a01c2.tar.gz
dh_systemd_start: add --no-start
-rw-r--r--debian/changelog1
-rwxr-xr-xscript/dh_systemd_start8
2 files changed, 8 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 9f76b09..bab9997 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ init-system-helpers (1.5) unstable; urgency=low
and /etc/systemd to pass a piuparts run.
* deb-systemd-helper: add --quiet
* dh_systemd_enable: add --no-enable
+ * dh_systemd_start: add --no-start
-- Michael Stapelberg <stapelberg@debian.org> Sun, 14 Jul 2013 21:53:26 +0200
diff --git a/script/dh_systemd_start b/script/dh_systemd_start
index f1752bb..8d18805 100755
--- a/script/dh_systemd_start
+++ b/script/dh_systemd_start
@@ -46,6 +46,11 @@ this option.
Do not stop service on upgrade.
+=item B<--no-start>
+
+Do not start the unit file after upgrades and after initial installation (the
+latter is only relevant for services without a corresponding init script).
+
=back
=head1 NOTES
@@ -185,9 +190,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if ($dh{RESTART_AFTER_UPGRADE}) {
$sd_autoscript->("postinst", "postinst-systemd-restart");
- } else {
+ } elsif (!$dh{NO_START}) {
# We need to stop/start before/after the upgrade.
$sd_autoscript->("postinst", "postinst-systemd-start");
+ }
}
$sd_autoscript->("postrm", "postrm-systemd-reload-only");