[Bug 596993] Re: hostname handling needs improvement for elastic-ip and ebs start-stop
Gerry Reno
596993 at bugs.launchpad.net
Thu Jan 20 00:23:35 UTC 2011
Running the following commands appears to correctly set all the forms of
hostname on my Lucid ec2 instance:
echo "$(curl -s http://169.254.169.254/latest/meta-data/local-hostname)"
| sed 's:\..*$::' > /etc/hostname
/sbin/sysctl -w kernel.hostname="$(curl -s http://169.254.169.254/latest
/meta-data/local-hostname | sed 's:\..*$::')"
logout/login shell
root at ip-10-XXX-181-59:~# uname -n
ip-10-XXX-181-59
root at ip-10-XXX-181-59:~# hostname -s
ip-10-XXX-181-59
root at ip-10-XXX-181-59:~# hostname -d
ec2.internal
root at ip-10-XXX-181-59:~# hostname -f
ip-10-XXX-181-59.ec2.internal
root at ip-10-XXX-181-59:~# hostname
ip-10-XXX-181-59
root at ip-10-XXX-181-59:~# echo $HOSTNAME
ip-10-XXX-181-59
root at ip-10-XXX-181-59:~# cat /etc/hostname
ip-10-XXX-181-59
root at ip-10-XXX-181-59:~# /sbin/sysctl -n kernel.hostname
ip-10-XXX-181-59
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in ubuntu.
https://bugs.launchpad.net/bugs/596993
Title:
hostname handling needs improvement for elastic-ip and ebs start-stop
More information about the Ubuntu-server-bugs
mailing list