Comment 7 for bug 690138

Revision history for this message
Juha Litola (juha-litola) wrote :

Hi,

I'm not sure whether this is invalid, as it will affect anyone who happens to have '/' character in the JAVA_OPTS, and I guess it is not that rare. Postinstall should escape those strings before it puts them to sed command line. I'm not sed expert, but it could be done with something like below. Or at least one could replace '/' as control character in substitution with '#' or some other rarer character.

juha@intra ~% export BAR=bar
juha@intra ~% echo foo | sed "s/foo/$BAR/"
bar
juha@intra ~% export BAR=bar/bar
juha@intra ~% echo foo | sed "s/foo/`$BAR/"
sed: -e expression #1, char 11: unknown option to `s'
juha@intra ~% echo foo | sed 's/foo/'`echo -n $BAR | sed 's#/#\\\/#g'`'/'
bar/bar