[DRE-maint] Bug#685578: [RFR] templates://chef-solr/{chef-solr.templates}

Jonathan Nieder jrnieder at gmail.com
Sat Aug 25 18:55:47 UTC 2012


Hi,

Justin B Rye wrote:

>     RabbitMQ's rabbitmqctl program, which will be used to set this password,
>     cannot read input from a file. Instead the password will be passed to it
>     as a quoted string, so it must not include any shell special characters
>     (such as the exclamation mark) which will cause errors.

In theory, it should be possible to pass arbitrary special characters
to a program through a Bourne-style shell by surrounding the argument
with single-quotes and replacing each ' with '\'' and each ! with
'\!'.  Like so:

 arg_for_string () {
	printf '%s\n' "$1" |
	sed -e "
		s/'/'\\\\''/g
		s/^/'/
		s/\$/'/
	"
 }

 read arg
 arg=$(arg_for_string arg)
 printf 'Commandline: arg %s\n' "$arg"

Maybe doing so could allow the debconf prompt to be simplified.  Is
there a bug filed about that?

Hope that helps,
Jonathan



More information about the Pkg-ruby-extras-maintainers mailing list