diff options
author | Niels Thykier <niels@thykier.net> | 2015-11-28 22:50:33 +0100 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2015-11-28 22:50:36 +0100 |
commit | cf096da13582deb0cf0c0c910f70a05cbaa0b0c1 (patch) | |
tree | 9bb806d20f2bb4e2d2bfafb2c1d21f7fd87b24bf | |
parent | 0fffcd9ea4abb36f288eee0c3e03de036726f720 (diff) | |
download | debhelper-cf096da13582deb0cf0c0c910f70a05cbaa0b0c1.tar.gz |
dh_installinit: add /g modifier to the autoscript snippet
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dh_installinit | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 56c24792..b5775498 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ debhelper (9.20151126+unreleased) UNRELEASED; urgency=medium * dh_installinit: Apply patch from Reiner Herrmann to sort temporary files put in postinst. (Closes: #806392) + * dh_installinit: Import change from Ubuntu to add /g + modifier when substituting the auto-script snippets. -- Niels Thykier <niels@thykier.net> Sat, 28 Nov 2015 09:18:02 +0100 diff --git a/dh_installinit b/dh_installinit index f438cd93..d0f351c7 100755 --- a/dh_installinit +++ b/dh_installinit @@ -296,34 +296,34 @@ foreach my $package (@{$dh{DOPACKAGES}}) { # update-rc.d, and restart (or # start if new install) script autoscript($package,"postinst", "postinst-init-restart", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); + "s/#SCRIPT#/$script/g;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); } else { # update-rc.d, and start script autoscript($package,"postinst", "postinst-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); + "s/#SCRIPT#/$script/g;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); } if ($dh{R_FLAG} || $dh{RESTART_AFTER_UPGRADE}) { # stops script only on remove autoscript($package,"prerm","prerm-init-norestart", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); + "s/#SCRIPT#/$script/g;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); } else { # always stops script autoscript($package,"prerm","prerm-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); + "s/#SCRIPT#/$script/g;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); } } else { # just update-rc.d autoscript($package,"postinst", "postinst-init-nostart", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); + "s/#SCRIPT#/$script/g;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); } # removes rc.d links autoscript($package,"postrm","postrm-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); + "s/#SCRIPT#/$script/g;s/#INITPARMS#/$params/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/"); } } } |