Thank you for taking the time to file a bug report and try to solve it! Looking at your proposed resolution if we were to escape the $ then it would replace %JAVA_OPTS with $JAVA_OPTS, however I do not believe that is what we want. The goal of this line is to set the JAVA_OPTS based on the following:
db_get tomcat7/javaopts && JAVA_OPTS="$RET" || JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC" You will also note how the previous two lines do not escape $TOMCAT7_USER or $TOMCAT7_GROUP. My initial guess is that JAVA_OPTS may have the '%' character in it. That would in turn mess up the sed command since '%' is used as the delimiter in that statement. In fact there was a similar Debian bug [1] reported about this issue with the '/' character. There is a comment as to changing to '%' as it shows up less often :) [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597814 ** Bug watch added: Debian Bug tracker #597814 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597814 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1666570 Title: Post install script has error in RegEx To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/tomcat7/+bug/1666570/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs