From 55660bdeb60575b7c6f99e760eb74e955e0066f4 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Tue, 20 Feb 2018 14:42:51 -0500 Subject: [PATCH] cobbler: echo short hostname into /etc/hostname during rc.local Fixes: https://tracker.ceph.com/issues/23052 Ceph should be able to handle the FQDN but whatever. Signed-off-by: David Galloway --- roles/cobbler/templates/snippets/cephlab_rc_local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/cobbler/templates/snippets/cephlab_rc_local b/roles/cobbler/templates/snippets/cephlab_rc_local index e9d0c8df..5dcee1b9 100644 --- a/roles/cobbler/templates/snippets/cephlab_rc_local +++ b/roles/cobbler/templates/snippets/cephlab_rc_local @@ -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 -- 2.47.3