From: Nikolay Martynov Date: Tue, 22 Jul 2014 00:12:01 +0000 (-0400) Subject: ssh: send hostname to dhcp server X-Git-Tag: lxc-1.1.0.alpha2~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b78b2e23a17cdf59d057201508c1f0a90afb7e9e;p=thirdparty%2Flxc.git ssh: send hostname to dhcp server Send container's hostname to dhcp server when getting ip address. Signed-off-by: Nikolay Martynov Acked-by: Stéphane Graber --- 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