summaryrefslogtreecommitdiff
path: root/packaging/common/rabbitmq-asroot-script-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/common/rabbitmq-asroot-script-wrapper')
-rw-r--r--packaging/common/rabbitmq-asroot-script-wrapper18
1 files changed, 5 insertions, 13 deletions
diff --git a/packaging/common/rabbitmq-asroot-script-wrapper b/packaging/common/rabbitmq-asroot-script-wrapper
index 0dd1c0fb..ee5947b6 100644
--- a/packaging/common/rabbitmq-asroot-script-wrapper
+++ b/packaging/common/rabbitmq-asroot-script-wrapper
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
## The contents of this file are subject to the Mozilla Public License
## Version 1.1 (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
@@ -30,24 +30,16 @@
## Contributor(s): ______________________________________.
##
-# Escape spaces and quotes, because shell is revolting.
-for arg in "$@" ; do
- # Escape quotes in parameters, so that they're passed through cleanly.
- arg=$(sed -e 's/"/\\"/' <<-END
- $arg
- END
- )
- CMDLINE="${CMDLINE} \"${arg}\""
-done
-
cd /var/lib/rabbitmq
SCRIPT=`basename $0`
if [ `id -u` = 0 ] ; then
- /usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}
+ /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
else
- echo -e "\nOnly root should run ${SCRIPT}\n"
+ echo
+ echo "Only root should run ${SCRIPT}"
+ echo
exit 1
fi