diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2015-09-22 03:07:22 +0300 |
|---|---|---|
| committer | Michael Klishin <mklishin@pivotal.io> | 2015-09-22 03:07:22 +0300 |
| commit | 6964e8ac1559cf76b9245394b46aaec5822f4178 (patch) | |
| tree | d4e8206d3e653379d0df8fcbf049266872ff354e /packaging/common | |
| parent | 6abc15914fea8d1586adc67111cf58eb19e2eef6 (diff) | |
| parent | d93cfdbf961c25e8b9c23692273b4640ef1e0f58 (diff) | |
| download | rabbitmq-server-git-6964e8ac1559cf76b9245394b46aaec5822f4178.tar.gz | |
Merge branch 'stable'
Diffstat (limited to 'packaging/common')
| -rw-r--r-- | packaging/common/rabbitmq-script-wrapper | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/packaging/common/rabbitmq-script-wrapper b/packaging/common/rabbitmq-script-wrapper index d964affaa1..67fa669a4d 100644 --- a/packaging/common/rabbitmq-script-wrapper +++ b/packaging/common/rabbitmq-script-wrapper @@ -15,19 +15,15 @@ ## Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved. ## -# Escape spaces and quotes, because shell is revolting. SED_OPT="-E" if [ $(uname -s) = "Linux" ]; then SED_OPT="-r" fi for arg in "$@" ; do - # Escape quotes in parameters, so that they're passed through cleanly. - arg=$(sed $SED_OPT -e 's/(["$])/\\\1/g' <<-END - $arg - END - ) - CMDLINE="${CMDLINE} \"${arg}\"" + # Wrap each arg in single quotes and wrap single quotes in double quotes, so that they're passed through cleanly. + arg=`printf %s $arg | sed $SED_OPT -e "s/'/'\"'\"'/g"` + CMDLINE="${CMDLINE} '${arg}'" done cd /var/lib/rabbitmq |
