tomcat6 postinst script err (sed)

Bug #708572 reported by jmullee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: tomcat6

problem occurred parsing this in /var/lib/dpkg/info/tomcat6.postinst

dpkg --configure --pending

    sed: -e expression #1, char 175: unknown option to `s'

my defaults file is modified like this :
john@box# tail /etc/default/tomcat6
    # Enabling JMX
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9003"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/tomcat6/jmxremote.password"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file=/etc/tomcat6/jmxremote.access"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"

.. so I edited /var/lib/dpkg/info/tomcat6.postinst to make the sed command use a different delimiter, because the
jmxremote.*.file lines (above) contain forward-slashes that are being interpreted as delimiters by sed.

prev
        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\"/" \
fixed
        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\"|" \

- john.. 2011-01-27

Revision history for this message
James Page (james-page) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

  apport-collect 708572

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
James Page (james-page) wrote :

This is probably a duplicate of 654549 assuming that you are having this issue in Maverick.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.