]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_common.sh: 'hostname -s' (instead of cut ...)
authorSage Weil <sage@inktank.com>
Tue, 18 Sep 2012 20:31:06 +0000 (13:31 -0700)
committerSage Weil <sage@inktank.com>
Thu, 20 Sep 2012 17:12:30 +0000 (10:12 -0700)
This will also match up with the instructions in the docs.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph_common.sh

index 73f13f4585b4f871146dc4e6a5b2578aeeef0365..b66b1de3a53d5e041891b25ba735155033eaad7a 100644 (file)
@@ -5,7 +5,7 @@ CCONF="$BINDIR/ceph-conf"
 default_conf=$ETCDIR"/ceph.conf"
 conf=$default_conf
 
-hostname=`hostname | cut -d . -f 1`
+hostname=`hostname -s`
 
 verify_conf() {
     # fetch conf?
@@ -35,7 +35,7 @@ check_host() {
     # what host is this daemon assigned to?
     host=`$CCONF -c $conf -n $type.$id host`
     if [ "$host" = "localhost" ]; then
-       echo "$0: use a proper short hostname, not 'localhost', in $conf section $type.$id; skipping entry"
+       echo "$0: use a proper short hostname (hostname -s), not 'localhost', in $conf section $type.$id; skipping entry"
        return 1
     fi
     ssh=""