summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>2004-04-28 18:13:35 +0000
committerjoey <joey>2004-04-28 18:13:35 +0000
commitb06b7343ec19e3b5d70f16f074491b679012f8e3 (patch)
tree80f817ce03487876658981abdfe26c374dc43d6d
parent6c8f807a132fc6266b53bc01c0d4dc02a4899836 (diff)
r1682: * dh_installinfo: escape '&' characters in INFO-DIR-SECTION when calling
sed. Also support \1 etc for completeness. Closes: #246301
-rwxr-xr-xdh_installinfo2
1 files changed, 2 insertions, 0 deletions
diff --git a/dh_installinfo b/dh_installinfo
index 814c831b..78dddc7b 100755
--- a/dh_installinfo
+++ b/dh_installinfo
@@ -105,6 +105,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if ($section ne '') {
$section=~s:/:\\/:g; # allow / in section.
+ $section=~s/\&/\\&/g; # escape sed specials
+ $section=~s/(\\[0-9])/\\\\$1/g; # more sed specials
autoscript($package,"postinst","postinst-info",
"s/#SECTION#/$section/g;s:#FILE#:$fn:");
}