summaryrefslogtreecommitdiff
path: root/scripts/rabbitmqctl
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2010-11-19 14:55:20 +0000
committerEmile Joubert <emile@rabbitmq.com>2010-11-19 14:55:20 +0000
commiteb54f2af108b52cd96fe506ecafb9fbfbfe2d8a3 (patch)
tree5ff6e95176adffb96b9a51df9b3216ce57894342 /scripts/rabbitmqctl
parent5f7e24198de005dd24ef20f73299a6848c15dcde (diff)
downloadrabbitmq-server-eb54f2af108b52cd96fe506ecafb9fbfbfe2d8a3.tar.gz
Make scripts work on Solaris
Diffstat (limited to 'scripts/rabbitmqctl')
-rwxr-xr-xscripts/rabbitmqctl10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/rabbitmqctl b/scripts/rabbitmqctl
index 76ce25fd..e024129d 100755
--- a/scripts/rabbitmqctl
+++ b/scripts/rabbitmqctl
@@ -30,8 +30,14 @@
## Contributor(s): ______________________________________.
##
-[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s`
-NODENAME=rabbit@${HOSTNAME%%.*}
+if [ "SunOS" = `uname -s` ]
+then
+ [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname`
+ NODENAME=rabbit@`echo $HOSTNAME | sed 's/\\..*//'`
+else
+ [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s`
+ NODENAME=rabbit@${HOSTNAME%%.*}
+fi
. `dirname $0`/rabbitmq-env