diff options
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 |