]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
ssh: send hostname to dhcp server
authorNikolay Martynov <mar.kolya@gmail.com>
Tue, 22 Jul 2014 00:12:01 +0000 (20:12 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 8 Aug 2014 16:14:19 +0000 (12:14 -0400)
Send container's hostname to dhcp server when getting ip address.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-sshd.in

index 569f12efb8117dd0f5ccaee4aab8e440677f58c7..949c2ad1e53250af641e8c76f09c37d629a650db 100644 (file)
@@ -229,7 +229,7 @@ if [ $0 = "/sbin/init" ]; then
         touch /etc/fstab
         rm -f /dhclient.conf
         cat > /dhclient.conf << EOF
-send host-name "<hostname>";
+send host-name = gethostname();
 EOF
         ifconfig eth0 up
         dhclient eth0 -cf /dhclient.conf