Comment 1 for bug 1666570

Revision history for this message
Joshua Powers (powersj) wrote :

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