diff options
author | Emile Joubert <emile@rabbitmq.com> | 2010-11-19 14:55:20 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2010-11-19 14:55:20 +0000 |
commit | eb54f2af108b52cd96fe506ecafb9fbfbfe2d8a3 (patch) | |
tree | 5ff6e95176adffb96b9a51df9b3216ce57894342 /scripts/rabbitmqctl | |
parent | 5f7e24198de005dd24ef20f73299a6848c15dcde (diff) | |
download | rabbitmq-server-eb54f2af108b52cd96fe506ecafb9fbfbfe2d8a3.tar.gz |
Make scripts work on Solaris
Diffstat (limited to 'scripts/rabbitmqctl')
-rwxr-xr-x | scripts/rabbitmqctl | 10 |
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 |