Since sed supports pretty much any arbitrary character as a separator, we could
use something other than the '/' character, which would alleviate the need for
users to escape it.  I'm attaching a patch that uses '%' instead, as it doesn't
seem to occur as often as '/' does.

Any thoughts on including this patch in the next package upload for squeeze?  We
have an upload (6.0.28-7) ready to go that includes the Czech debconf 
translation.

Thank you,
tony
Index: debian/tomcat6.postinst
===================================================================
--- debian/tomcat6.postinst	(revision 13007)
+++ debian/tomcat6.postinst	(working copy)
@@ -18,9 +18,9 @@
 	tmpfile=`mktemp /tmp/tomcat6.XXXXXXXXXX`
 	chmod 644 $tmpfile
 	cat $TEMPLATE \
-		| sed "s/^TOMCAT6_USER=.*$/TOMCAT6_USER=$TOMCAT6_USER/" \
-		| sed "s/^TOMCAT6_GROUP=.*$/TOMCAT6_GROUP=$TOMCAT6_GROUP/" \
-		| sed "s/^JAVA_OPTS=.*$/JAVA_OPTS=\"$JAVA_OPTS\"/" \
+		| sed "s%^TOMCAT6_USER=.*$%TOMCAT6_USER=$TOMCAT6_USER%" \
+		| sed "s%^TOMCAT6_GROUP=.*$%TOMCAT6_GROUP=$TOMCAT6_GROUP%" \
+		| sed "s%^JAVA_OPTS=.*$%JAVA_OPTS=\"$JAVA_OPTS\"%" \
 		>> $tmpfile
 	ucf --debconf-ok --sum-file /usr/share/tomcat6/defaults.md5sum $tmpfile $CONFFILE
 	rm -f $tmpfile

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to