From b78b2e23a17cdf59d057201508c1f0a90afb7e9e Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Mon, 21 Jul 2014 20:12:01 -0400 Subject: [PATCH] ssh: send hostname to dhcp server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Send container's hostname to dhcp server when getting ip address. Signed-off-by: Nikolay Martynov Acked-by: Stéphane Graber --- templates/lxc-sshd.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lxc-sshd.in b/templates/lxc-sshd.in index 569f12efb..949c2ad1e 100644 --- a/templates/lxc-sshd.in +++ b/templates/lxc-sshd.in @@ -229,7 +229,7 @@ if [ $0 = "/sbin/init" ]; then touch /etc/fstab rm -f /dhclient.conf cat > /dhclient.conf << EOF -send host-name ""; +send host-name = gethostname(); EOF ifconfig eth0 up dhclient eth0 -cf /dhclient.conf