Public bug reported: Binary package hint: tomcat6
Dear Colleagues, during security update of tomcat6 on maverick (and the same will happen everywhere), when you have a JAVA_OPTS line with something like that JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Dpath.foo=/etc/foo/monitoring.properties" the sed call of : 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\"/" \ >> $tmpfile will fail because of the slashes. Those slashes are not escaped properly. Adding a line with: db_get tomcat6/javaopts && JAVA_OPTS="$RET" || JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC" JAVA_OPTS=`echo $JAVA_OPTS|sed -e 's#\/#\\\/#g'` helps here. Please find attached the patched maverick tomcat6 src package with postinst fixed. It needs to be done for lucid and natty and other releases too. Regards, \sh ** Affects: tomcat6 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/707348 Title: tomcat6 doesn't configure cleanly with JAVA_OPTS having values with slashes -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs