]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
cobbler: echo short hostname into /etc/hostname during rc.local
authorDavid Galloway <dgallowa@redhat.com>
Tue, 20 Feb 2018 19:42:51 +0000 (14:42 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 20 Feb 2018 19:42:51 +0000 (14:42 -0500)
Fixes: https://tracker.ceph.com/issues/23052
Ceph should be able to handle the FQDN but whatever.

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/cobbler/templates/snippets/cephlab_rc_local

index e9d0c8dfdbfec5ee7c56661a95e6c01440aef222..5dcee1b97fb82d101eff52b7677effed94eb3def 100644 (file)
@@ -80,7 +80,7 @@ if [ -n "$myips" ]; then
           hostname $newhostname
           newdomain=$(hostname -d)
           shorthostname=$(hostname -s)
-          echo $newhostname > /etc/hostname
+          echo $shorthostname > /etc/hostname
           if grep -q $newdomain /etc/hosts; then
             # Replace
             sed -i "s/.*$newdomain.*/$ip $newhostname $shorthostname/g" /etc/hosts