From 18187bee56a1da4b76b090811bc7cea0d8c66039 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sat, 27 Feb 2016 11:14:13 +0000 Subject: dh_installinit: Make -R the default in compat 10 Signed-off-by: Niels Thykier --- dh_installinit | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'dh_installinit') diff --git a/dh_installinit b/dh_installinit index b9fc7d6a..981707be 100755 --- a/dh_installinit +++ b/dh_installinit @@ -84,14 +84,23 @@ call. Example: =item B<-R>, B<--restart-after-upgrade> Do not stop the init script until after the package upgrade has been -completed. This is different than the default behavior, which stops the -script in the F, and starts it again in the F. +completed. This is the default behaviour in compat 10. + +In early compat levels, the default was to stop the script in the +F, and starts it again in the F. This can be useful for daemons that should not have a possibly long downtime during upgrade. But you should make sure that the daemon will not get confused by the package being upgraded while it's running before using this option. +=item B<--no-restart-after-upgrade> + +Undo a previous B<--restart-after-upgrade> (or the default of compat +10). If no other options are given, this will cause the service to be +stopped in the F script and started again in the F +script. + =item B<-r>, B<--no-restart-on-upgrade> Do not stop init script on upgrade. @@ -155,11 +164,13 @@ instances of the same text to be added to maintainer scripts. =cut +$dh{RESTART_AFTER_UPGRADE} = 1 if not compat(10); + init(options => { "r" => \$dh{R_FLAG}, "no-restart-on-upgrade" => \$dh{R_FLAG}, "no-start" => \$dh{NO_START}, - "R|restart-after-upgrade" => \$dh{RESTART_AFTER_UPGRADE}, + "R|restart-after-upgrade!" => \$dh{RESTART_AFTER_UPGRADE}, "init-script=s" => \$dh{INIT_SCRIPT}, "update-rcd-params=s", => \$dh{U_PARAMS}, "remove-d" => \$dh{D_FLAG}, -- cgit v1.2.3