ssh: send hostname to dhcp server

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>
This commit is contained in:
Nikolay Martynov 2014-07-21 20:12:01 -04:00 committed by Stéphane Graber
parent 4849ab991b
commit b78b2e23a1

View 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