summaryrefslogtreecommitdiff
path: root/dh_installinit
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2015-11-28 22:50:33 +0100
committerNiels Thykier <niels@thykier.net>2015-11-28 22:50:36 +0100
commitcf096da13582deb0cf0c0c910f70a05cbaa0b0c1 (patch)
tree9bb806d20f2bb4e2d2bfafb2c1d21f7fd87b24bf /dh_installinit
parent0fffcd9ea4abb36f288eee0c3e03de036726f720 (diff)
downloaddebhelper-cf096da13582deb0cf0c0c910f70a05cbaa0b0c1.tar.gz
dh_installinit: add /g modifier to the autoscript snippet
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_installinit')
-rwxr-xr-xdh_installinit12
1 files changed, 6 insertions, 6 deletions
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}/");
}
}
}